|
From: Culley H. <cu...@fl...> - 2004-04-07 21:40:02
|
I am once again hitting the problem of a webtest not following the
redirect after form submission. Here is a working example:
$this->get('http://mudhut.org/test_form.php');
$this->assertField('blah', '');
$this->setField('blah', 'jabberwokky');
$this->clickSubmit('Submit Query');
$this->showSource();
$this->assertWantedPattern('/jabberwokky/');
All test_form.php is doing is:
<?php
if (array_key_exists('blah', $_POST)) {
header("Location: results.php?blah={$_POST['blah']}");
exit;
}
?>
And results.php:
<?php
print_r($_GET);
?>
|