我試着寫在laravel測試,但我甚至無法運行示例測試,BCS我得到錯誤:Laravel測試未定義的方法
λ phpunit
PHP Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in E:\www\ikcms\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1042
Stack trace:
#0 E:\www\ikcms\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(163): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 E:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 E:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 E:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in E:\www\ikcms\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1042
Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in E:\www\ikcms\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1042
Stack trace:
#0 E:\www\ikcms\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(163): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 E:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 E:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 E:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in E:\www\ikcms\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1042
當然,它發生在下載laravel後。
Laravel版本:5.3 的PHPUnit:5.0
更新作曲家包後,我有這個相同的錯誤。 – rahman