0

I am developing an application using Laravel 5.4. Before proceeding to the next modules of my project. I want to test unit test each module or some core features of my application. I would like to use the built in php unit test that I have read in the docs of laravel.

However when I try to run the phpunit command in my PowerShell there is an error.

Here is the error below:

PHP Fatal error:  Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\Users\Jaaayz\Documents\ad-fingerprinting\ser ver\vendor\phpunit\phpunit\src\TextUI\TestRunner.php:1066 Stack trace:
#0 C:\Users\Jaaayz\Documents\ad-fingerprinting\server\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(163): 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:\Users\Jaaayz\Documents\ad-fingerprinting\server\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1066

Fatal error: Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration() in C:\Users\Jaaayz\Documents\ad-fingerprinting\server\v endor\phpunit\phpunit\src\TextUI\TestRunner.php:1066 Stack trace:
#0 C:\Users\Jaaayz\Documents\ad-fingerprinting\server\vendor\phpunit\phpunit\src\TextUI\TestRunner.php(163): 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:\Users\Jaaayz\Documents\ad-fingerprinting\server\vendor\phpunit\phpunit\src\TextUI\TestRunner.php on line 1066

Is there something wrong in the installation?

I think there would be no problem at all because it is a built in package for laravel.

Appreciate if someone can help me.

Thanks in advance.

Jaaayz
  • 1,533
  • 7
  • 27
  • 59
  • Yes may in your test file? Remove all code and Try to add one by one and check which part have issue? – Niklesh Raut Oct 12 '17 at 03:38
  • No specific file each time I run a phpunit command in my PS it just say the error above. Even if I try to run some commands to test a specific file it just displays the error. – Jaaayz Oct 12 '17 at 03:42
  • When it was running what you changed in your code , if using git try `git stash` to go back to previous state – Niklesh Raut Oct 12 '17 at 03:47
  • I don't have any changes in my code I just pulled the latest in that branch then I checkout to a branch where I will phpunit test each module. But this error shows up :( – Jaaayz Oct 12 '17 at 03:50
  • use it like this: `vendor/bin phpunit` – Amin.Qarabaqi Oct 12 '17 at 13:38

0 Answers0