0

For some reason whenever I try to use $I->submitForm() in functional tests for a form on the homepage, the homepage is loaded instead of the form action no matter what the form action is set to. I've tried custom urls as setup in routes.php and urls that should match sections.

To test I've added a dd() in the intended controller action. This is triggered when using $I->amOnPage('/myaction') but when submitting a form with a GET method and an action set to the same url using $I->submitForm(), the dd() is not triggered. Instead, the status code is 200 and the homepage content is there according to $I->see()

Can anyone suggest what I might be doing wrong? To me it seems like a problem with routing but it's odd it works with one method and not the other?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.