r71778 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71777‎ | r71778 | r71779 >
Date:01:38, 27 August 2010
Author:mah
Status:ok
Tags:
Comment:
Start of verbose option, fix url option
Modified paths:
  • /trunk/phase3/maintenance/tests/RunSeleniumTests.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/RunSeleniumTests.php
@@ -36,6 +36,7 @@
3737 $this->addOption( 'browser', 'The browser he used during testing' );
3838 $this->addOption( 'url', 'The Mediawiki installation to point to.' );
3939 $this->addOption( 'list-browsers', 'List the available browsers.' );
 40+ $this->addOption( 'verbose', 'Be noisier.' );
4041
4142 $this->deleteOption( 'dbpass' );
4243 $this->deleteOption( 'dbuser' );
@@ -54,10 +55,12 @@
5556 echo $desc;
5657 }
5758
58 - protected function runTests() {
 59+ protected function runTests( $verbose = false ) {
5960 global $wgSeleniumLogger, $wgSeleniumTestSuites;
6061
61 - SeleniumLoader::load();
 62+ require_once( 'Testing/Selenium.php' );
 63+ require_once( 'PHPUnit/Framework.php' );
 64+ require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' );
6265 $result = new PHPUnit_Framework_TestResult;
6366 $wgSeleniumLogger = new SeleniumTestConsoleLogger;
6467 $result->addListener( new SeleniumTestListener( $wgSeleniumLogger ) );
@@ -84,10 +87,10 @@
8588
8689 $wgSeleniumServerPort = $this->getOption( 'port', 4444 );
8790 $wgSeleniumTestsSeleniumHost = $this->getOption( 'host', 'localhost' );
88 - $wgSeleniumTestsWikiUrl = $this->getOption( 'test-url', $wgServer . $wgScriptPath );
 91+ $wgSeleniumTestsWikiUrl = $this->getOption( 'url', $wgServer . $wgScriptPath );
8992 $wgSeleniumTestsUseBrowser = $this->getOption( 'browser', 'firefox' );
9093
91 - $this->runTests();
 94+ $this->runTests( $this->hasOption( 'verbose' ) );
9295 }
9396 }
9497

Status & tagging log