[SOLVED, Cause: Stupidity] WebTestCase submitFormById
Posted: Fri Jun 09, 2006 5:32 pm
Hi guys,
I have:
http://help.yogler.com currently spits out:
The one fail that SimpleTest comes up with is
- Nathaniel
I have:
Code: Select all
class HelpTestCase extends WebTestCase
{
function testDefaultsToIndexOfQuestions()
{
$this->get('http://help.yogler.com/');
$this->assertResponse(200);
$this->assertWantedPattern('/yogler.com help/i');
$this->assertField('q');
$this->submitFormById('search');
$this->assertResponse(200, 'If this does not pass, check that the index tests pass first. Error: %s; Current URL: ' . $this->getUrl());
}
}Code: Select all
<html><body>yogler.com help <form id="submit" method="get" action="/search"><input name="q" /></form></body></html>So... it appears to me that it does not like submitting the form by the id... but why? Submitting the form manually by hitting enter when the input box is in focus works as intended.If this does not pass, check that the index tests pass first. Error: Expecting response in [200] got []; Current URL: at line [20]
- Nathaniel