I think cross test conflict may be the reason. Have you tried composer dump-autoload and still same error persist you can run the full test suite using the --process-isolation flag.
Hi, in the meantime I found out the issue.
It's a really silly thing, but no tutorial ever explains that while we use PHPUnit for testing, the tests should NOT extend the PHPUnit TestCase class but the one provided by Laravel (\Tests\TestCase).
For some reason, that small, but extremely important piece of information is never mentioned in the articles, Youtube videos, etc. I have seen. That's something people are expected to know.
I think cross test conflict may be the reason. Have you tried composer dump-autoload and still same error persist you can run the full test suite using the --process-isolation flag.
Still, I put your advice away in my "things to know" folder, probably will come handy at some point.
Hi, in the meantime I found out the issue.
It's a really silly thing, but no tutorial ever explains that while we use PHPUnit for testing, the tests should NOT extend the PHPUnit TestCase class but the one provided by Laravel (\Tests\TestCase).
For some reason, that small, but extremely important piece of information is never mentioned in the articles, Youtube videos, etc. I have seen. That's something people are expected to know.
I didn't. That was the issue. ¯_(ツ)_/¯
@rolandhesz That actually works for me. Not sure why