Index: trunk/phase3/maintenance/tests/RunSeleniumTests.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | $this->addOption( 'browser', 'The browser he used during testing' ); |
38 | 38 | $this->addOption( 'url', 'The Mediawiki installation to point to.' ); |
39 | 39 | $this->addOption( 'list-browsers', 'List the available browsers.' ); |
| 40 | + $this->addOption( 'verbose', 'Be noisier.' ); |
40 | 41 | |
41 | 42 | $this->deleteOption( 'dbpass' ); |
42 | 43 | $this->deleteOption( 'dbuser' ); |
— | — | @@ -54,10 +55,12 @@ |
55 | 56 | echo $desc; |
56 | 57 | } |
57 | 58 | |
58 | | - protected function runTests() { |
| 59 | + protected function runTests( $verbose = false ) { |
59 | 60 | global $wgSeleniumLogger, $wgSeleniumTestSuites; |
60 | 61 | |
61 | | - SeleniumLoader::load(); |
| 62 | + require_once( 'Testing/Selenium.php' ); |
| 63 | + require_once( 'PHPUnit/Framework.php' ); |
| 64 | + require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' ); |
62 | 65 | $result = new PHPUnit_Framework_TestResult; |
63 | 66 | $wgSeleniumLogger = new SeleniumTestConsoleLogger; |
64 | 67 | $result->addListener( new SeleniumTestListener( $wgSeleniumLogger ) ); |
— | — | @@ -84,10 +87,10 @@ |
85 | 88 | |
86 | 89 | $wgSeleniumServerPort = $this->getOption( 'port', 4444 ); |
87 | 90 | $wgSeleniumTestsSeleniumHost = $this->getOption( 'host', 'localhost' ); |
88 | | - $wgSeleniumTestsWikiUrl = $this->getOption( 'test-url', $wgServer . $wgScriptPath ); |
| 91 | + $wgSeleniumTestsWikiUrl = $this->getOption( 'url', $wgServer . $wgScriptPath ); |
89 | 92 | $wgSeleniumTestsUseBrowser = $this->getOption( 'browser', 'firefox' ); |
90 | 93 | |
91 | | - $this->runTests(); |
| 94 | + $this->runTests( $this->hasOption( 'verbose' ) ); |
92 | 95 | } |
93 | 96 | } |
94 | 97 | |