Closed ashsmith closed 4 years ago
Hello @ashsmith I am investigating this issue now. When calling "I am on page" the context calls the same method:
$this->getSession->visit($this->locatePath($something));
I always find that I use the above method within my context as well. This allows behat to read the behat.yml and build a valid URL.
If you can provide the feature file that is failing and a snippet of the context it will help when testing.
I noticed
$processedUri
ends up looking like/[adminRouter]/[controller]/[action]/key/[key]/[action]
I also noticed, when the key is generated, it is generated using just the admin router. Which is incorrect, it should be generated using either just the controller, or the controller and action.
Finally, when
$this->getSession()->visit($processedUri)
is run, for me, the url generated looked like:http://localhost/admin/[controller]/[action]/key/[key]/[action]/
. The expected result was:http://mymachine.local/myproject/admin/[controller]/[action]/key/[key]/
. Passing$processedUri
through$this->locatePath()
fixed the issue.