I want to create a test which will directly post data to a Laravel page to test it handling bad data.
I can run an acceptance test starting at the page with the form on, call $I->click('Search'); and the page processes the data as expected.
Reading the introduction to Functional Tests on the Codeception website, it states
In simple terms we set $_REQUEST, $_GET and $_POST variables, then we execute your script inside a test, we receive output, and then we test it.
This sounds ideal, set an array of POST data and fire it directly at the processing page. But I can't find any documentation for it. I've played with sendAjaxPostRequest but it's not passing anything to $_POST.
Is there a way I can test the pages in isolation like this?