If you’re running the default Laravel 5 tests with PHPUnit you might come across the above error. This is because there are no functions with “test” prepended to the start of them. In your TestCase.php file you shouldn’t really have any of that because it is setting up your application for testing.
To remove this test failure add “abstract” to the start of your class declaration for TestCase.php so the new line looks like:
abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
4 comments
This happened to me too, but only because my test file name didn’t match the class name in that file. By default, I think Laravel will not try to look for tests in TestCase.
Hi Nick,
I touched base with you 12 months ago about my project that was needing a Laravel Dev. Since I went forward and we are now live with 15,000 users and paying national clients.
Are you available at the moment for any Laravel freelance work? We are looking to add a experience Laravel dev to our team of 8.
Cheers,
Christian
MD
M: 0488 445 645
Thank you!
Nicee. tks