$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 );
+++ /dev/null
-<?php
-
-class SimpleSeleniumTest extends SeleniumTestCase
-{
- public $name = "Basic selenium test";
-
- public function runTest()
- {
- $this->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 );
-
- }
-
-}
--- /dev/null
+<?php
+
+class SimpleSeleniumTestCase extends SeleniumTestCase
+{
+ public function __construct( $name = 'Basic selenium test') {
+ parent::__construct( $name );
+ }
+
+ public function runTest()
+ {
+ $this->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 );
+
+ }
+
+}
--- /dev/null
+ <?php\r
+ \r
+require_once(dirname( __FILE__ ) . '/SimpleSeleniumTestCase.php');\r
+\r
+class SimpleSeleniumTestSuite extends SeleniumTestSuite\r
+{\r
+ public function __construct( $name = 'Basic selenium test suite') {\r
+ parent::__construct( $name );\r
+ }\r
+\r
+ public function addTests() {\r
+ $test = new SimpleSeleniumTestCase();\r
+ parent::addTest( $test );\r
+ }\r
+}\r