Run your tests with:
- old way:
- new way:
php artisan test
- Or using the PHPStorm UI.
Then in console throws this error:
ReflectionException: Class env does not exist
Below it says that something in test environment fails with Telescope, I didnt change any code base or environment so... this problem is always related with cache:
- Step 1
Disable telescope for tests on your PHPUnit.xml add:
<env name="TELESCOPE_ENABLED" value="false"/>
- Step 2
Then go to the terminal and execute:
php artisan clear php artisan config:clear
I get the solution from two sites:
I only facilitate the information in this platform because I had a few hours searching for a solution and with a descriptive title it would be easy to search for anyone in the future.
Thanks for reading!