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

Also available in: Atom PDF