Bug #78298
closedphpunit fails with extensions on current master
100%
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
Updated by Helmut Hummel about 8 years ago
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?
Updated by Helmut Hummel about 8 years ago
- Status changed from New to Needs Feedback
Updated by Stefan Froemken about 8 years ago
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.
Updated by Gerrit Code Review about 8 years ago
- Status changed from Needs Feedback 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/50230
Updated by Gerrit Code Review about 8 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/50230
Updated by Anonymous about 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c1d70e4d08f371232d3818dca30d4bde55eb29af.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed