我不知道它是否與Laravel 5.4相關。當我安裝laravel 5.4而不做任何改變,我得到Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration()
後運行phpunit
命令,但是當我運行php artisan dusk
它通常PHPunit未捕獲錯誤:調用未定義的方法PHPUnit_Util_Configuration :: getTestdoxGroupConfiguration()
c:\xampp\htdocs\ublocker>phpunit
PHP Fatal error: Uncaught Error: Call to undefined method
PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
#0 C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
{main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
c:\xampp\htdocs\ublocker>phpunit
PHP Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
#0 C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1046
Stack trace:
#0 C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(167): PHPUnit_TextUI_TestRunner->handleConfiguration(Array)
#1 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#2 C:\xampp\php\pear\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#3 C:\xampp\php\phpunit(46): PHPUnit_TextUI_Command::main()
#4 {main}
thrown in C:\xampp\htdocs\ublocker\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1046
c:\xampp\htdocs\ublocker>php artisan dusk
PHPUnit 5.7.7 by Sebastian Bergmann and contributors.
F. 2/2 (100%)
任何想法運行如何解決這一問題?
我試過在全球更新phpunit,但仍然沒有奏效。我敢打賭我的xampp導致了這個錯誤。你如何更新xampp中的phpunit?他們仍然在使用phpunit 3.5.7版本,因爲我在終端中用「vendor/bin/phpunit」說過,您是否嘗試啓動它? – ishadif
? – arku
是的,我做了,它的工作,但我仍然好奇如何更新全球。每次運行測試時都不會很方便地運行'vendor \ bin \ phpunit',對不對? – ishadif