0
我正在做一個CakePHP 3.x項目在Vagrant虛擬機上。我的項目有一個控制器測試。項目設置使用作曲家和phpunit安裝在供應商目錄。PHP致命錯誤:未找到接口'PHPUnit Framework TestListener'
運行./vendor/bin/phpunit
測試引發以下錯誤:
[[email protected] ~/www]$ ./vendor/bin/phpunit Tests
PHP Fatal error: Interface 'PHPUnit\Framework\TestListener' not found in /vagrant/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 30
Fatal error: Interface 'PHPUnit\Framework\TestListener' not found in /vagrant/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 30
我試着運行了單個控制器的PHPUnit以及 - 具有相同的結果...
[[email protected] ~/www]$ ./vendor/bin/phpunit tests/TestCase/Controller/QuestionsControllerTest.php
PHP Fatal error: Interface 'PHPUnit\Framework\TestListener' not found in /vagrant/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 30
Fatal error: Interface 'PHPUnit\Framework\TestListener' not found in /vagrant/vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php on line 30
我很新的即使沒有起飛,PHPUnit也會跑進牆壁。任何幫助在這裏將不勝感激。