Project

General

Profile

Actions

Bug #57206

closed

Fix incomplete mocking in several tests

Added by Helmut Hummel about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-03-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

IndexerServiceTest and ExtensionManagementServiceTest
both execute emit signal methods which in turn
try to instantiate the SignalSlotDispatcher,
which can fail.

Resolve this by mocking these methods.

In fact the following happened:

  • a core test instantiates SignalSlotDispatcher with ObjectMananger and succeeds because it mocked TYPO3_DB so ClassInfoCache (with DB Backend) does work as DB call just returns nothing
  • the singleton SignalSlotDispatcher is stored in the singleton ObjectMananger as instance
  • now the ExtensionManagementServiceTest can also get an instance of the SignalSlotDispatcher as the ObjectMananger has it already
  • When executing ExtensionManagementServiceTest alone, there is no mocking of TYPO3_DB and no available SignalSlotDispatcher in ObjectMananger so the ClassInfoCache tries to fetch the class info from DB and fails because TYPO3_DB is not an object.
Actions #1

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/28666

Actions #2

Updated by Helmut Hummel about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #3

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF