【问题标题】:Functional Tests with TYPO3 v10 no composer autoloadTYPO3 v10 没有作曲家自动加载的功能测试
【发布时间】:2020-10-08 06:24:23
【问题描述】:

当我尝试运行使用类 TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase 的功能测试时,我收到错误 Class 'TYPO3\CMS\Frontend\Tests\Functional\SiteHandling\AbstractTestCase' not found .... 这是作曲家自动加载器的问题吗?任何想法如何解决这个问题?

/usr/bin/php7.4 /mypath/typo3_10/vendor/phpunit/phpunit/phpunit --bootstrap /mypath/typo3_10/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php --configuration /mypath/typo3_10/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml /mypath/typo3_10/web/typo3/sysext/seo --teamcity

是 PHPStorm 中的命令。

【问题讨论】:

  • 请分享更多细节。你检查过这个类是否存在吗?是否使用任何自动加载器?

标签: testing composer-php phpunit typo3 autoload


【解决方案1】:
"autoload-dev": {
    "psr-4": {
        "TYPO3\\CMS\\Frontend\\Tests\\": "web/typo3/sysext/frontend/Tests/",
        "TYPO3\\CMS\\Core\\Tests\\": "web/typo3/sysext/core/Tests/"
    }
}

解决方案是将缺少的命名空间添加到根 composer.json 并再次转储自动加载器

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-27
    • 2017-09-07
    • 1970-01-01
    • 2013-12-09
    • 1970-01-01
    • 1970-01-01
    • 2013-03-05
    相关资源
    最近更新 更多