From: Markus Glaser Date: Thu, 27 Jan 2011 14:51:58 +0000 (+0000) Subject: Added triggerClientTestResources, which makes the use of separate test resourecs... X-Git-Tag: 1.31.0-rc.0~32338 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=557a85891aaa3cb5d5948c01790ede165f7e1842;p=lhc%2Fweb%2Fwiklou.git Added triggerClientTestResources, which makes the use of separate test resourecs optional. Needed for testing installer functions. --- diff --git a/tests/selenium/SeleniumTestSuite.php b/tests/selenium/SeleniumTestSuite.php index 821906f27d..81a630f8ae 100644 --- a/tests/selenium/SeleniumTestSuite.php +++ b/tests/selenium/SeleniumTestSuite.php @@ -4,6 +4,7 @@ abstract class SeleniumTestSuite extends PHPUnit_Framework_TestSuite { 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 @@ abstract class SeleniumTestSuite extends PHPUnit_Framework_TestSuite { $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 @@ abstract class SeleniumTestSuite extends PHPUnit_Framework_TestSuite { protected function setLoginBeforeTests( $loginBeforeTests = true ) { $this->loginBeforeTests = $loginBeforeTests; } + + protected function setTriggerClientTestResources( $triggerClientTestResources = true ) { + $this->triggerClientTestResources = $triggerClientTestResources; + } }