From: Markus Glaser Date: Sat, 31 Jul 2010 12:00:10 +0000 (+0000) Subject: changed testrunner in order to run suites instead of single tests. Patch supplied... X-Git-Tag: 1.31.0-rc.0~35819 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=fe38545fd5c4d2c465a2efc465d6ff1fefbe8cde;p=lhc%2Fweb%2Fwiklou.git changed testrunner in order to run suites instead of single tests. Patch supplied by Dan Nessett --- diff --git a/maintenance/tests/RunSeleniumTests.php b/maintenance/tests/RunSeleniumTests.php index f70f279f9e..e872219c8b 100644 --- a/maintenance/tests/RunSeleniumTests.php +++ b/maintenance/tests/RunSeleniumTests.php @@ -46,9 +46,9 @@ $result = new PHPUnit_Framework_TestResult; $logger = new SeleniumTestConsoleLogger; $result->addListener( new SeleniumTestListener( $logger ) ); -$suite = new SeleniumTestSuite; -foreach ( $wgSeleniumTests as $testClass ) { - $suite->addTest( new $testClass ); +foreach ( $wgSeleniumTestSuites as $testSuiteName ) { + $suite = new $testSuiteName; + $suite->addTests(); + $suite->run( $result ); } -$suite->run( $result ); diff --git a/maintenance/tests/selenium/SimpleSeleniumTest.php b/maintenance/tests/selenium/SimpleSeleniumTest.php deleted file mode 100644 index 5ee32cd0ea..0000000000 --- a/maintenance/tests/selenium/SimpleSeleniumTest.php +++ /dev/null @@ -1,21 +0,0 @@ -open( Selenium::getBaseUrl() . '/index.php?title=Selenium&action=edit' ); - $this->type( "wpTextbox1", "This is a basic test" ); - $this->click( "wpPreview" ); - $this->waitForPageToLoad( 10000 ); - - // check result - $source = $this->getText( "//div[@id='wikiPreview']/p" ); - $correct = strstr( $source, "This is a basic test" ); - $this->assertEquals( $correct, true ); - - } - -} diff --git a/maintenance/tests/selenium/SimpleSeleniumTestCase.php b/maintenance/tests/selenium/SimpleSeleniumTestCase.php new file mode 100644 index 0000000000..848cba82f8 --- /dev/null +++ b/maintenance/tests/selenium/SimpleSeleniumTestCase.php @@ -0,0 +1,24 @@ +open( Selenium::getBaseUrl() . + '/index.php?title=Selenium&action=edit' ); + $this->type( "wpTextbox1", "This is a basic test" ); + $this->click( "wpPreview" ); + $this->waitForPageToLoad( 10000 ); + + // check result + $source = $this->getText( "//div[@id='wikiPreview']/p" ); + $correct = strstr( $source, "This is a basic test" ); + $this->assertEquals( $correct, true ); + + } + +} diff --git a/maintenance/tests/selenium/SimpleSeleniumTestSuite.php b/maintenance/tests/selenium/SimpleSeleniumTestSuite.php new file mode 100644 index 0000000000..4efd8b344d --- /dev/null +++ b/maintenance/tests/selenium/SimpleSeleniumTestSuite.php @@ -0,0 +1,15 @@ +