Bug #78298
closed
phpunit fails with extensions on current master
Added by Stefan Froemken about 8 years ago.
Updated about 7 years ago.
Description
Hello Core-Team,
I can't run phpunit Tests for my extensions on current master of TYPO3: 9e27eb11ddcb7c3612b3cc786e77aec65d1e88b0
Error: Class xyz not found.
It seems that it is only a problem with extensions with a composer.json.
I have found following lines in Bootstrap::baseSetup:
if (!self::$usesComposerClassLoading && ClassLoadingInformation::isClassLoadingInformationAvailable()) {
ClassLoadingInformation::registerClassLoadingInformation();
}
after adding a "!" to last condition it works for phpunit, but FE and BE are broken then.
if (!self::$usesComposerClassLoading && !ClassLoadingInformation::isClassLoadingInformationAvailable()) {
ClassLoadingInformation::registerClassLoadingInformation();
}
Stefan
if (self::$usesComposerClassLoading && !ClassLoadingInformation::isClassLoadingInformationAvailable()) {
This condition is definitely wrong!
I can't run phpunit Tests for my extensions on current master of TYPO3
Can you please elaborate how you installed TYPO3 and how you exactly tried to execute the tests?
- Status changed from New to Needs Feedback
Log from PhpStorm:
/Applications/MAMP/bin/php/php7.0.10/bin/php /Applications/MAMP/htdocs/typo3_git/typo3_src/vendor/phpunit/phpunit/phpunit --configuration /Applications/MAMP/htdocs/typo3_git/typo3/sysext/core/Build/UnitTests.xml /Applications/MAMP/htdocs/typo3_git/typo3conf/ext/recommend_a_page --teamcity
Testing started at 15:59 ...
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.
Class 'JWeiland\RecommendAPage\Controller\DisplayController' not found
/Applications/MAMP/htdocs/extensions/recommend_a_page/Tests/Unit/Controller/DisplayControllerTest.php:37
/Applications/MAMP/htdocs/typo3_src/vendor/phpunit/phpunit/phpunit:47
Same problem with various other extensions like tx_news.
- Status changed from Needs Feedback to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF