Testing Single Method Works, but MULTIPLE Methods Fail?
Hey guys,
I did a fresh install of Laravel and trying to write some simple tests for built in Auth. The thing is, each of these test methods work great if I run them with --filter method_name but if I run them together, only the first method works and the second method fails giving me ..
A request to [http://app] failed. Received status code [404].
Finally after 1.5 hours of losing hair I found what was causing it..
Seems like PHPUnit doesn't like that I'm using separate files to organize my routes. I put all the routes in the routes.php file and now it's working as expected.
// routes.php
// This was causing the issue
include_once 'Routes\CommonRoutes.php';
include_once 'Routes\AuthRoutes.php';