laravel fatal error for TestCase not found

前端 未结 8 1912
离开以前
离开以前 2021-02-12 13:26
http://localhost/laravel/app/tests/ExampleTest.php

if i run laravel it shows the following error

Fatal error: Class \'TestCase\' not found in D

8条回答
  •  独厮守ぢ
    2021-02-12 13:37

    Run following command in your project's root directory

    phpunit app/tests/
    

    Update:

    You can also run with the following command if phpunit is not installed on your machine. Which is also better to avoid version differences between team mates.

    vendor/bin/phpunit
    

提交回复
热议问题