I am having problems with Laravel Dusk in my application. I created a new Laravel 5.4 project inside of a Vagrant Box and I installed Dusk according to the directions in the official documentation (https://laravel.com/docs/5.4/dusk). When I run phpunit ExampleTest.php
I get the following error:
PHP Fatal error: Class 'Tests\DuskTestCase' not found in /var/www/my_project/tests/Browser/ExampleTest.php on line 9
Fatal error: Class 'Tests\DuskTestCase' not found in /var/www/my_project/tests/Browser/ExampleTest.php on line 9
When I try to run it with php artisan dusk
I get:
PHPUnit 5.7.20 by Sebastian Bergmann and contributors.
<br />
<b>Error</b>: <font color="FF0000"><b>Internal script failure</b><br />
I have no idea what is causing this issue. Tests\DuskTestCase
is most definitely in my ExampleTest.php file. Also, if it helps, the autoload-dev
section of my composer.json
file is as follows:
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
Does anyone have any idea what is going on? I can't seem to find a solution anywhere. Thanks in advance for any help.