r81089 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81088‎ | r81089 | r81090 >
Date:14:51, 27 January 2011
Author:mglaser
Status:deferred
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/phase3/tests/selenium/SeleniumTestSuite.php
@@ -4,6 +4,7 @@
55 private $selenium;
66 private $isSetUp = false;
77 private $loginBeforeTests = true;
 8+ private $triggerClientTestResources = true;
89
910 // Do not add line break after test output
1011 const CONTINUE_LINE = 1;
@@ -21,16 +22,20 @@
2223 $this->isSetUp = true;
2324 $this->selenium = Selenium::getInstance();
2425 $this->selenium->start();
25 - $this->selenium->open( $this->selenium->getUrl() . '/index.php?setupTestSuite=' . $this->getName() );
26 - //wait a little longer for the db operation
27 - $this->selenium->waitForPageToLoad( 6000 );
 26+ if ( $this->triggerClientTestResources ) {
 27+ $this->selenium->open( $this->selenium->getUrl() . '/index.php?setupTestSuite=' . $this->getName() );
 28+ //wait a little longer for the db operation
 29+ $this->selenium->waitForPageToLoad( 6000 );
 30+ }
2831 if ( $this->loginBeforeTests ) {
2932 $this->login();
3033 }
3134 }
3235
3336 public function tearDown() {
34 - $this->selenium->open( $this->selenium->getUrl() . '/index.php?clearTestSuite=' . $this->getName() );
 37+ if ( $this->triggerClientTestResources ) {
 38+ $this->selenium->open( $this->selenium->getUrl() . '/index.php?clearTestSuite=' . $this->getName() );
 39+ }
3540 $this->selenium->stop();
3641 }
3742
@@ -45,4 +50,8 @@
4651 protected function setLoginBeforeTests( $loginBeforeTests = true ) {
4752 $this->loginBeforeTests = $loginBeforeTests;
4853 }
 54+
 55+ protected function setTriggerClientTestResources( $triggerClientTestResources = true ) {
 56+ $this->triggerClientTestResources = $triggerClientTestResources;
 57+ }
4958 }

Status & tagging log