pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.49k stars 343 forks source link

Laravel: Can not exceute any artisan command `Pest\Exceptions\InvalidPestCommand` #1015

Closed azim-kordpour closed 10 months ago

azim-kordpour commented 10 months ago

I use laravel module package and after writing some tests that run correctly, I found out that none of Laravel artisan commands like php artisan route:list is executed and I just get this error:

 Pest\Exceptions\InvalidPestCommand 

 Please run [./vendor/bin/pest] instead.

I have moved Pest.php and other default test files to a base module. My all tests work correctly. I have no idea what happened.

azim-kordpour commented 10 months ago

I put Pest.php in the default location and the problem was solved.