I have a form, submitted via POST, which displays a selectable list of 'items' to be installed. The PHP script which receives it installs whichever items were selected, then redirects to a new page using header() after it has finished processing. I have been testing functionality using the Simpletest WebTestCase, and would like to check that resubmitting the same form will result in an error message, as items may not be installed twice. In my browser, I can submit the form, let the page redirect, click the Back button and resubmit the form which will result in the error message I have coded. How can I test this in Simpletest? If I run this:
Code: Select all
$this->assertTrue($this->back());However, running this:
Code: Select all
$this->assertTrue($this->retry());TIA