spriebsch Tue May 12 22:28:57 2009 UTC
Modified files:
/phpruntests/tests/configuration/preconditions
rtIfParallelHasPcntlTest.php
Log:
Fixed test to work with refactored rtRuntestsConfiguration.
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php?r1=1.4&r2=1.5&diff_format=u
Index:
phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php
diff -u
phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.4
phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.5
---
phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php:1.4
Sat Apr 25 15:39:09 2009
+++ phpruntests/tests/configuration/preconditions/rtIfParallelHasPcntlTest.php
Tue May 12 22:28:57 2009
@@ -30,16 +30,11 @@
protected function setUp()
{
$this->preCondition = new rtIfParallelHasPcntl();
- $this->commandLine = new rtCommandLineOptions();
-
- $this->environment = rtEnvironmentVariables::getInstance();
}
protected function tearDown()
{
unset($this->preCondition);
- unset($this->commandLine);
- unset($this->environment);
}
/**
@@ -48,9 +43,9 @@
*/
public function testCheckWhenCommandLineOptionIsSet()
{
- $this->commandLine->parse(array('run-tests.php', '-z'));
+ $runtestsConfiguration =
rtRuntestsConfiguration::getInstance(array('run-tests.php', '-z'));
- $this->assertEquals(extension_loaded('pcntl'),
$this->preCondition->check($this->commandLine, $this->environment));
+ $this->assertEquals(extension_loaded('pcntl'),
$this->preCondition->check($runtestsConfiguration));
}
/**
@@ -59,9 +54,10 @@
*/
public function testCheckWhenEnvironmentVariableIsSet()
{
- $this->environment->setVariable('TEST_PHP_PARALLEL', true);
+ $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array());
+ $runtestsConfiguration->setEnvironmentVariable('TEST_PHP_PARALLEL',
true);
- $this->assertTrue($this->preCondition->check($this->commandLine,
$this->environment));
+ $this->assertTrue($this->preCondition->check($runtestsConfiguration));
}
/**
@@ -69,7 +65,9 @@
*/
public function testCheckWhenParallelExecutionIsNotRequired()
{
- $this->assertTrue($this->preCondition->check($this->commandLine,
$this->environment));
+ $runtestsConfiguration = rtRuntestsConfiguration::getInstance(array());
+
+ $this->assertTrue($this->preCondition->check($runtestsConfiguration));
}
/**
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php