Bug #54963

Unittests for extensionmanager lack mock for emitWillInstallExtensions()

Added by Markus Klein almost 6 years ago. Updated about 1 year ago.

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

100%

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.

Associated revisions

Revision f294b262 (diff)
Added by Markus Klein almost 6 years ago

[BUGFIX] Fix PHP warnings in PackageManager

Resolves: #54963
Releases: 6.2
Change-Id: I58b1f6109872d6eb8059fceb1bec1af7134e84e2
Reviewed-on: https://review.typo3.org/26789
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

History

#1 Updated by Gerrit Code Review almost 6 years ago

  • Status changed from Accepted 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/26789

#2 Updated by Gerrit Code Review almost 6 years ago

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

#3 Updated by Gerrit Code Review almost 6 years ago

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

#4 Updated by Markus Klein almost 6 years ago

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

#5 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF