From e699a73bf4ee474d19bb60a8f099ff3e44c37ffc Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Tue, 6 Mar 2007 05:08:28 +0000 Subject: [PATCH] Stub for a web-based integration test --- lib/simpletest/testcourses.php | 60 ++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 lib/simpletest/testcourses.php diff --git a/lib/simpletest/testcourses.php b/lib/simpletest/testcourses.php new file mode 100644 index 0000000000000..415b878c5c896 --- /dev/null +++ b/lib/simpletest/testcourses.php @@ -0,0 +1,60 @@ +libdir . '/simpletestlib.php'); +require_once($CFG->libdir . '/moodlelib.php'); + +/** + * This test is meant(!?) to run extensive tests on as much of moodle's + * xhtml output as possible, using a test database as a stable test bed, + * and sending the output of each page to the w3c validating service + * (or some other service that can return a better report), and checking + * whether that report is valid or not. + * + * A global function for validating xhtml output is badly needed. + * + * One possible solution is to extend this WebTestCase class by adding a + * AssertValidXhtml($output) method. The output is obtained by any + * WebTestCase using $this->_browser->getContent(). + * + * Setting up validation scripts would then be very simple. + */ +class xhtml_test extends WebTestCase { + + function setUp() { + global $CFG; + + $this->get($CFG->wwwroot); + $this->click('Course 4'); + } + + function testLogin() { + $this->assertTitle('Nick\'s tests & Things: Login to the site'); + + } +} +?> \ No newline at end of file