Project

General

Profile

Actions

Bug #78298

closed

phpunit fails with extensions on current master

Added by Stefan Froemken about 8 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
composer
Target version:
Start date:
2016-10-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Actions #1

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?

Actions #2

Updated by Helmut Hummel about 8 years ago

  • Status changed from New to Needs Feedback
Actions #3

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.

Actions #4

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

Actions #5

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

Actions #6

Updated by Anonymous about 8 years ago

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

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF