PHP Fatal error: Class 'Tests\TestCase' not found
Created 6 years ago by powerball12

Hi, Everything is working fine. But when i want to make a UnitTest it gives me this error "PHP Fatal error: Class 'Tests\TestCase' not found". I used Laravel's way of making a UnitTest " // Create a test in the Unit directory... php artisan make:test UserTest --unit " I have been looking on GitHub and the Forum but i can't find any solution. I installed PHPUnit 7.1

fryiee  —  6 years ago

@powerball12 Pyro's tests have a different namespace. They need to extend \TestCase . This is because we have root namespaced the Pyro tests so they more easily work with the addon pattern that Pyro uses.

baldwindavidrye  —  6 years ago

In Pyro, you need to write the test case in TestCase directory. Only this part is little different than basic Laravel unit testing where you have to do it inside the Test directory. The rest of the process for running the test is basically the same as Laravel.