|
From: Jason S. <jsw...@ya...> - 2004-04-14 20:54:53
|
--- Thomas Carrié <th...@fr...> wrote:
> There are some functions (assertWantedPattern) that let you check that 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 that
> 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 =& $this->GetBrowser();
$content = $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
|