Why doesn’t PHPUnit work? Perhaps your machine’s version doesn’t meet Laravel’s requirement. Laravel has pre-installed PHPUnit via Composer. You can run it instead. In my case, vendor/bin/phpunit works fine. For the rest of the tutorial, I will use vendor/bin/phpunit.

Tests

By completing the previous step, you confirm the seeding and unit test are working well. It is the green light to create the real tests.