http://www.mediawiki.org/wiki/Special:Code/MediaWiki/81089
Revision: 81089 Author: mglaser Date: 2011-01-27 14:51:58 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Added triggerClientTestResources, which makes the use of separate test resourecs optional. Needed for testing installer functions. Modified Paths: -------------- trunk/phase3/tests/selenium/SeleniumTestSuite.php Modified: trunk/phase3/tests/selenium/SeleniumTestSuite.php =================================================================== --- trunk/phase3/tests/selenium/SeleniumTestSuite.php 2011-01-27 13:46:00 UTC (rev 81088) +++ trunk/phase3/tests/selenium/SeleniumTestSuite.php 2011-01-27 14:51:58 UTC (rev 81089) @@ -4,6 +4,7 @@ private $selenium; private $isSetUp = false; private $loginBeforeTests = true; + private $triggerClientTestResources = true; // Do not add line break after test output const CONTINUE_LINE = 1; @@ -21,16 +22,20 @@ $this->isSetUp = true; $this->selenium = Selenium::getInstance(); $this->selenium->start(); - $this->selenium->open( $this->selenium->getUrl() . '/index.php?setupTestSuite=' . $this->getName() ); - //wait a little longer for the db operation - $this->selenium->waitForPageToLoad( 6000 ); + if ( $this->triggerClientTestResources ) { + $this->selenium->open( $this->selenium->getUrl() . '/index.php?setupTestSuite=' . $this->getName() ); + //wait a little longer for the db operation + $this->selenium->waitForPageToLoad( 6000 ); + } if ( $this->loginBeforeTests ) { $this->login(); } } public function tearDown() { - $this->selenium->open( $this->selenium->getUrl() . '/index.php?clearTestSuite=' . $this->getName() ); + if ( $this->triggerClientTestResources ) { + $this->selenium->open( $this->selenium->getUrl() . '/index.php?clearTestSuite=' . $this->getName() ); + } $this->selenium->stop(); } @@ -45,4 +50,8 @@ protected function setLoginBeforeTests( $loginBeforeTests = true ) { $this->loginBeforeTests = $loginBeforeTests; } + + protected function setTriggerClientTestResources( $triggerClientTestResources = true ) { + $this->triggerClientTestResources = $triggerClientTestResources; + } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs