2
votes

I create a new laravel 5 project and have this error:

C:\xampp\php\php.exe C:/Users/Night/AppData/Local/Temp/ide-phpunit.php --no-configuration C:\xampp\htdocs\laravelProject
Testing started at 11:43 AM ...

Fatal error: Class 'TestCase' not found in C:\xampp\htdocs\laravelProject\tests\ExampleTest.php on line 8

Process finished with exit code 255

I run phpunit tests/ in the directory of my project(C:\xampp\htdocs\laravelProject) but it doesn't work.

PHPUnit 4.8.16 by Sebastian Bergmann and contributors.
.
Time: 842 ms, Memory: 8.75Mb

OK (1 test, 2 assertions)

I'm using phpstorm 9.0 laravel 5 php 5.6

1
1) How did you install PHPUnit? I guess via Composer? 2) Please show screenshots of how you configured it in PhpStorm.LazyOne

1 Answers

3
votes

Phpstorm does not know how to autoload the classes required for the project. Set up your debug configuration to use the default phpunit.xml located at the project root.

enter image description here