|
From: Thomas <th...@fr...> - 2004-04-15 22:45:09
|
Thank you, it works PS : why does getBrowser returns TestBrowser according to the phpdoc wher= eas=20 there is only a SimpleBrowser class in the phpdoc and no TestBrowser ? ____ Now I face another problem, how do I set radio button attribute to checke= d <input name=3D'confirm' type=3D'radio' value=3D'cancel' checked>Do Not De= lete joe <input name=3D'confirm' type=3D'radio' value=3D'1'> Delete joe According to http://www.lastcraft.com/form_testing_documentation.php#mult= iple=20 I have done this : $this->setField('confirm', array('value' =3D> '1')); because I want to check "Delete Joe" and uncheck "Do not delete Joe", it=20 doesn't work and I cannot find in the phpdoc=20 (http://simpletest.sourceforge.net/) what is the expected structure of th= e=20 $value when the field is a RadioGroup ? Le Mercredi 14 Avril 2004 22:54, Jason Sweat a =E9crit : > --- Thomas Carri=E9 <th...@fr...> wrote: > > There are some functions (assertWantedPattern) that let you check tha= t > > some pattern is in the page, but there is no function to test without= any > > failure if some pattern is in the page > > > > I would like a function testPattern(string $pattern) > > > > If you think that is not a good idea, how can I write a clean test th= at > > doesn't depend on weither user joe exist in the page or not. > > Hi Thomas, > > I think you are looking for something like: > > function testCreateUser() { > $this->get("http://foo.com/userlist.php"); > $browser =3D& $this->GetBrowser(); > $content =3D $browser->GetContent(); > if (preg_match($some_pattern, $content)) { > ... > } else { > ... > } > } > > Regards, > > Jason > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online by April 15th > http://taxes.yahoo.com/filing.html --=20 Thomas Carri=E9 Identit=E9 GPG : 0285ED14 http://www.adullact.org/IMG/pdf/doc-157.pdf http://www.lebars.org/sec/tcpa-faq.fr.html http://www.pimientolinux.com/peru2ms/villanueva_to_ms.html http://petition.eurolinux.org/pr/fr/pr17.html http://aful.org/publi/articles/gilmore-copy-protection.html |