I have installed dusk for Laravel and since the beginning all the tests have failed. Instead of viewing the page that I want they all return a 404 error.
In order to find out what URL the test is trying to go instead of the one that I want I set up a custom 404 page and put the following code in it:
$_SERVER['REQUEST_URI']
Now the test return the URL that it tries to get and I found that it adds a "/session" to the end of the URL for example if I try to check:
'http://localhost/', DesiredCapabilities::chrome()
The test returns
<p>The requested URL /session was not found on this server.</p>
If I set the URL like this:
'http://localhost/fortest', DesiredCapabilities::chrome()
The test will return:
<p>The requested URL /fortest/session was not found on this server.</p>
I don't know if this has something with Laravel/dusk or PHPUnit or Selenium. Any help appreciated.