|
From: Marcus B. <ma...@wo...> - 2009-03-15 11:38:46
|
Hi...
Gabor Szabo wrote:
> So if I want to check if a field called xyz exists and has a value of 42.
> The success won't let me know in which form was that input field.
This is a known issue and is a performance problem with a PHP4
compatible version. The PHP5 version can look for the tidy extension to
speed things up, and so can do a lot more parsing.
A future version of SimpleTest will recognise a method called within()
used in two ways...
$this->within('#my-form')->assertField('life', 42);
$this->within('#my-form')->assertField('pi', 3.14);
$this->assertTitle('stuff');
...or...
$this->within('#my-form')
$this->assertField('life', 42);
$this->assertField('pi', 3.14);
$this->withinAll(); // or $this->within('*');
$this->assertTitle('stuff');
These would be equivalent. As will be this...
$this->assertField(new CssSelector('#life'), 42);
$this->within('#my-form')->assertField('#life', 42);
$this->assertField('#my-form #life', 42);
You may have to wait for this. I haven't written the CSS parser yet!
>
> regards
> Gabor
yours, Marcus
|