1

I am trying to start testing my Laravel 5.1 app using PHPUnitbut everytime I run phpunit in the cmd line I get the following error:

PHPUnit_Framework_Exception: Fatal error: Class 'PHPUnit_Util_Configuration' not found in C:\Users\ross\AppData\Local\Temp\PHPCD2E.tmp on line 347

Call Stack:
    0.0001     116952   1. {main}() -:0
    0.0011     266968   2. require_once('C:\Users\ross\AppData\Local\Temp\PHPCD2E.tmp') -:1

C:\xampp\php\pear\PHPUnit\TextUI\Command.php:176
C:\xampp\php\pear\PHPUnit\TextUI\Command.php:129

I have check my settings as far as I understand they are all pretty default as they come with Laravel. Does anyone have a clue as to why this is happening and how I can fix it? Thanks

4
  • How exactly are you trying to run phpunit? Commented Jun 10, 2016 at 11:05
  • 1
    Are you using pear? Laravel pulls in phpunit via composer right? Can you not do it that way? From my application root I usually run it by doing vendor/bin/phpunit you can of course set up an alias for this. Commented Jun 10, 2016 at 11:06
  • 2
    The C:\xampp\php\pear\PHPUnit path suggests that you installed PHPUnit via PEAR. That mode of installation has not been supported for years and is not possibly anymore since December 31, 2014: github.com/sebastianbergmann/phpunit/wiki/… Commented Jun 10, 2016 at 11:07
  • My bad I have also tried running it from [C:\xampp\php\phpunit] and it runs but with the same error message Commented Jun 10, 2016 at 11:41

1 Answer 1

2

Turns out running ./vendor/bin/phpunit works thanks to @kaakym for pointing em in the right direction

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.