Project

General

Profile

Actions

Bug #54963

closed

Unittests for extensionmanager lack mock for emitWillInstallExtensions()

Added by Markus Klein almost 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Tests
Target version:
Start date:
2014-01-13
Due date:
% Done:

100%

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

Description

Travis gives the following message

There was 1 error:

1) TYPO3\CMS\Extensionmanager\Tests\Unit\Service\ExtensionManagementServiceTest::installDependenciesCallsInstall

Invalid argument supplied for foreach()

/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/core/Classes/Package/Packaganager.php:634
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/core/Classes/Package/Packaganager.php:692
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/core/Classes/Package/Packaganager.php:719
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/core/Classes/Package/Packaganager.php:776
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/Packaganager.php:914
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/core/Classes/Package/Packaganager.php:316
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php:150
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/extensionmanager/Classes/Service/ExtensionManagementService.php:266
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/extensionmanager/Classes/Service/ExtensionManagementService.php:198
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/extensionmanager/Tests/Unit/Service/ExtensionManagementServiceTest.php:218
/home/travis/build/TYPO3/TYPO3.CMS/typo3/sysext/extbase/Tests/Unit/BaseTestCase.php:49
/home/travis/build/TYPO3/TYPO3.CMS/typo3conf/ext/phpunit/Composer/vendor/phpunit/phpunit/composer/bin/phpunit:63

The unittests should never reach the PackageManager here, this is out of scope. The reason is that signals are trigger in emitWillInstallExtensions().
Prevent the signals by mocking the method.

Actions

Also available in: Atom PDF