From b2e97539e7af7712b04dd5c2610a454d09aa0333 Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 7 Jul 2006 23:18:19 +0000 Subject: Update simpletest --- .../docs/en/web_tester_documentation.html | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'tests/test_tools/simpletest/docs/en/web_tester_documentation.html') diff --git a/tests/test_tools/simpletest/docs/en/web_tester_documentation.html b/tests/test_tools/simpletest/docs/en/web_tester_documentation.html index 51f604be..99dacacc 100755 --- a/tests/test_tools/simpletest/docs/en/web_tester_documentation.html +++ b/tests/test_tools/simpletest/docs/en/web_tester_documentation.html @@ -21,9 +21,6 @@ Group tests
$this->assertTitle('The Last Craft? Web developer tutorials on PHP, Extreme programming and Object Oriented development'); ++ ...or, if that is too long and fragile... +
+$this->assertTitle(new PatternExpectation('/The Last Craft/'));As well as the simple HTML content checks we can check that the MIME type is in a list of allowed types with... @@ -319,7 +317,7 @@ class TestOfLastcraft extends WebTestCase { function testContact() { $this->get('http://www.lastcraft.com/'); $this->clickLink('About'); - $this->assertTitle('About Last Craft'); + $this->assertTitle(new PatternExpectation('/About Last Craft/')); } } @@ -327,10 +325,15 @@ class TestOfLastcraft extends WebTestCase {
If the target is a button rather than an anchor tag, then - clickSubmit() should be used + clickSubmit() can be used with the button title...
$this->clickSubmit('Go!'); ++ If you are not sure or don't care, the usual case, then just + use the click() method... +
+$this->click('Go!');
-- cgit v1.2.3