zoe Sun May 17 13:58:51 2009 UTC
Modified files:
/phpruntests/src/configuration rtRuntestsConfiguration.php
rtEnvironmentVariables.php
/phpruntests/src/testrun rtPhpTestRun.php
Log:
moving the getting of user supplied variables to main run code to allow
independent testing of env settings
http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtRuntestsConfiguration.php?r1=1.9&r2=1.10&diff_format=u
Index: phpruntests/src/configuration/rtRuntestsConfiguration.php
diff -u phpruntests/src/configuration/rtRuntestsConfiguration.php:1.9
phpruntests/src/configuration/rtRuntestsConfiguration.php:1.10
--- phpruntests/src/configuration/rtRuntestsConfiguration.php:1.9 Wed May
13 11:08:32 2009
+++ phpruntests/src/configuration/rtRuntestsConfiguration.php Sun May 17
13:58:50 2009
@@ -66,9 +66,8 @@
$this->commandLine = new rtCommandLineOptions;
$this->commandLine->parse($this->commandLineArgs);
- //get and put envrionment variables
- $this->environmentVariables = rtEnvironmentVariables::getInstance();
- $this->environmentVariables->getUserSuppliedVariables();
+ //create object to hold environment variables
+ $this->environmentVariables = rtEnvironmentVariables::getInstance();
}
/**
@@ -152,5 +151,9 @@
{
return $this->commandLine->getTestFilename();
}
+
+ public function getUserEnvironment() {
+ $this->environmentVariables->getUserSuppliedVariables();
+ }
}
?>
http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtEnvironmentVariables.php?r1=1.3&r2=1.4&diff_format=u
Index: phpruntests/src/configuration/rtEnvironmentVariables.php
diff -u phpruntests/src/configuration/rtEnvironmentVariables.php:1.3
phpruntests/src/configuration/rtEnvironmentVariables.php:1.4
--- phpruntests/src/configuration/rtEnvironmentVariables.php:1.3 Fri Apr
24 08:41:25 2009
+++ phpruntests/src/configuration/rtEnvironmentVariables.php Sun May 17
13:58:50 2009
@@ -22,7 +22,7 @@
'NO_PHPTEST_SUMMARY',
);
- private $environmentVariables;
+ private $environmentVariables = array();
public function __construct()
{
@@ -41,9 +41,7 @@
{
if (isset($_ENV)) {
$this->environmentVariables = $_ENV;
- } else {
- $this->environmentVariables = array();
- }
+ }
foreach ($this->userSuppliedVariables as $variable) {
if (getenv($variable)) {
http://cvs.php.net/viewvc.cgi/phpruntests/src/testrun/rtPhpTestRun.php?r1=1.6&r2=1.7&diff_format=u
Index: phpruntests/src/testrun/rtPhpTestRun.php
diff -u phpruntests/src/testrun/rtPhpTestRun.php:1.6
phpruntests/src/testrun/rtPhpTestRun.php:1.7
--- phpruntests/src/testrun/rtPhpTestRun.php:1.6 Wed May 13 13:39:49 2009
+++ phpruntests/src/testrun/rtPhpTestRun.php Sun May 17 13:58:51 2009
@@ -18,6 +18,7 @@
//Configure the test environment
$runConfiguration =
rtRuntestsConfiguration::getInstance($this->commandLineArguments);
+ $runConfiguration->getUserEnvironment();
$runConfiguration->configure();
//Check the preconditions
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php