Issue Feature Closed

#69643Unit Tests can not be executed in "composer mode" projects

most wanted 09/10/15, 12:38 updated 10/02/18, 11:34

Description

I am not sure if I found a bug/missing feature – this should be possible, right?

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://composer.typo3.org/"
        }
    ],
    "require": {
        "typo3/cms": "7.4.0"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.7.0"
    },
    "config": {
        "bin-dir": "bin"
    }
}
composer install
./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml

This leads to this error message:

Fatal error: Class 'TYPO3\CMS\Core\Tests\UnitTestCase' not found in /Users/mostwanted/Projects/_sandbox/MyProject/typo3_src/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php on line 23

On the other hand this is working properly:

git clone git://git.typo3.org/Packages/TYPO3.CMS.git
cd TYPO3.CMS
git checkout 7.4.0
composer install
./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.