From: Mark A. Hershberger Date: Fri, 27 Aug 2010 01:38:09 +0000 (+0000) Subject: Start of verbose option, fix url option X-Git-Tag: 1.31.0-rc.0~35300 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=0ad6f8fe773dfa73c778a40461dead8fdfaf34f4;p=lhc%2Fweb%2Fwiklou.git Start of verbose option, fix url option --- diff --git a/maintenance/tests/RunSeleniumTests.php b/maintenance/tests/RunSeleniumTests.php index 0ddc585f53..935d9a4ac7 100644 --- a/maintenance/tests/RunSeleniumTests.php +++ b/maintenance/tests/RunSeleniumTests.php @@ -36,6 +36,7 @@ class SeleniumTester extends Maintenance { $this->addOption( 'browser', 'The browser he used during testing' ); $this->addOption( 'url', 'The Mediawiki installation to point to.' ); $this->addOption( 'list-browsers', 'List the available browsers.' ); + $this->addOption( 'verbose', 'Be noisier.' ); $this->deleteOption( 'dbpass' ); $this->deleteOption( 'dbuser' ); @@ -54,10 +55,12 @@ class SeleniumTester extends Maintenance { echo $desc; } - protected function runTests() { + protected function runTests( $verbose = false ) { global $wgSeleniumLogger, $wgSeleniumTestSuites; - SeleniumLoader::load(); + require_once( 'Testing/Selenium.php' ); + require_once( 'PHPUnit/Framework.php' ); + require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' ); $result = new PHPUnit_Framework_TestResult; $wgSeleniumLogger = new SeleniumTestConsoleLogger; $result->addListener( new SeleniumTestListener( $wgSeleniumLogger ) ); @@ -84,10 +87,10 @@ class SeleniumTester extends Maintenance { $wgSeleniumServerPort = $this->getOption( 'port', 4444 ); $wgSeleniumTestsSeleniumHost = $this->getOption( 'host', 'localhost' ); - $wgSeleniumTestsWikiUrl = $this->getOption( 'test-url', $wgServer . $wgScriptPath ); + $wgSeleniumTestsWikiUrl = $this->getOption( 'url', $wgServer . $wgScriptPath ); $wgSeleniumTestsUseBrowser = $this->getOption( 'browser', 'firefox' ); - $this->runTests(); + $this->runTests( $this->hasOption( 'verbose' ) ); } }