Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Fatal error: Uncaught Error: Call to undefined method PHPUnit\Util\Configuration::getExtensionConfiguration()

I am trying to follow the instructions here https://laravel.com/docs/5.6/testing. On the Environment section here what I did.

php artisan env --env=testing

and then run

phpunit

but after that, this message show up

PHP Fatal error:  Uncaught Error: Call to undefined method PHPUnit\Util\Configuration::getExtensionConfiguration() in /mnt/c/projects/www/janicalizdotcom/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:953
Stack trace:
#0 /mnt/c/projects/www/janicalizdotcom/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(153): PHPUnit\TextUI\TestRunner->handleConfiguration(Array)
#1 /usr/share/php/PHPUnit/TextUI/Command.php(195): PHPUnit\TextUI\TestRunner->doRun(Object(PHPUnit\Framework\TestSuite), Array, true)
#2 /usr/share/php/PHPUnit/TextUI/Command.php(148): PHPUnit\TextUI\Command->run(Array, true)
#3 /usr/bin/phpunit(34): PHPUnit\TextUI\Command::main()
#4 {main}
  thrown in /mnt/c/projects/www/janicalizdotcom/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 953

What is that mean? and what I should do about it?

I have no idea since its the first time running laravel test

like image 789
Fil Avatar asked Dec 01 '22 10:12

Fil


1 Answers

If just phpunit works that means that you have a global installation of PHPUnit. You probably want to use vendor/bin/phpunit instead.

like image 77
Sebastian Bergmann Avatar answered Dec 06 '22 07:12

Sebastian Bergmann