致命错误:Class' TestCase'在laravel 5中找不到

时间:2015-11-07 04:56:17

标签: php laravel laravel-5 phpstorm

我创建了一个新的laravel 5项目并出现此错误:

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

我在我的项目目录中运行phpunit tests /(C:\ xampp \ htdocs \ laravelProject),但它不起作用。

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

OK (1 test, 2 assertions)

我使用的是phpstorm 9.0 laravel 5 php 5.6

1 个答案:

答案 0 :(得分:3)

Phpstorm不知道如何自动加载项目所需的类。设置调试配置以使用位于项目根目录的默认phpunit.xml。

enter image description here

相关问题