zoe Sun Apr 26 06:54:01 2009 UTC
Modified files:
/phpruntests/src/configuration rtRuntestsConfiguration.php
Log:
Changes to the wy that the CGI executable is set
http://cvs.php.net/viewvc.cgi/phpruntests/src/configuration/rtRuntestsConfiguration.php?r1=1.4&r2=1.5&diff_format=u
Index: phpruntests/src/configuration/rtRuntestsConfiguration.php
diff -u phpruntests/src/configuration/rtRuntestsConfiguration.php:1.4
phpruntests/src/configuration/rtRuntestsConfiguration.php:1.5
--- phpruntests/src/configuration/rtRuntestsConfiguration.php:1.4 Sat Apr
25 17:18:13 2009
+++ phpruntests/src/configuration/rtRuntestsConfiguration.php Sun Apr 26
06:54:00 2009
@@ -1,9 +1,30 @@
<?php
/**
- * Contains onfiguration for test run. Includes:
- * Command line option, environment variables, ini overrides and settings
which are
- * derived from one or more command line options or environment variables.
+ * rtRuntestsConfiguration
*
+ * @category Testing
+ * @package RUNTESTS
+ * @author Zoe Slattery <[email protected]>
+ * @author Stefan Priebsch <[email protected]>
+ * @copyright 2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link http://qa.php.net/
+ */
+
+/**
+ * Sets up the configuration for the whole test run
+ *
+ * Settings are derived from command line options and/or environment variables.
+ * Runtests also overrides a number of ini settings.
+ *
+ *
+ * @category Testing
+ * @package RUNTESTS
+ * @author Zoe Slattery <[email protected]>
+ * @author Stefan Priebsch <[email protected]>
+ * @copyright 2009 The PHP Group
+ * @license http://www.php.net/license/3_01.txt PHP License 3.01
+ * @link http://qa.php.net/
*/
abstract class rtRuntestsConfiguration
{
@@ -16,12 +37,12 @@
private $settingNames = array (
'CurrentDirectory' => 'rtCurrentDirectorySetting',
+ 'WorkingDirectory' => 'rtWorkingDirectorySetting',
'LogFormat' => 'rtLogFormatSetting',
'PhpExecutable' => 'rtPhpExecutableSetting',
'PhpCgiExecutable' => 'rtPhpCgiExecutableSetting',
'TestFiles' => 'rtTestFileSetting',
'TestDirectories' => 'rtTestDirectorySetting',
- 'WorkingDirectory' => 'rtWorkingDirectorySetting',
'PhpCommandLineArguments' => 'rtPhpCommandLineArgSetting',
);
@@ -50,12 +71,10 @@
//set configuration
foreach ($this->settingNames as $name => $setting) {
$this->setters[$name] = new $setting($this);
- }
-
- foreach ($this->settingNames as $name => $setting) {
$methodName = 'set' . $name;
$this->$methodName();
}
+
}
/**
@@ -76,7 +95,7 @@
* Sets the directory that run-tests was started from
*
*/
- private function setCurrentDirectory()
+ private function setCurrentDirectory()
{
$this->settings['CurrentDirectory']=
$this->setters['CurrentDirectory']->get();
}
@@ -104,12 +123,12 @@
*
*/
private function setPhpCgiExecutable()
- {
- //If the CGI executable hasn't been set using an environmental
variable or 'auto', try and derive it from
+ {
+ //If the CGI executable hasn't been set using an environmental
variable or 'auto', try and derive it from
//the name of the cli executable.
//TODO This is *ix specific, need a WIN specific class
PhpCgiExecutable setting class
if($this->setters['PhpCgiExecutable']->get() == null) {
-
$this->setters['PhpCgiExecutable']->setFromPhpCli($this->settings['PhpExecutable']);
+
$this->setters['PhpCgiExecutable']->setFromPhpCli($this->settings['PhpExecutable']);
}
$this->settings['PhpCgiExecutable']=
$this->setters['PhpCgiExecutable']->get();
}
@@ -177,7 +196,7 @@
{
return $this->environmentVariables->getVariable($name);
}
-
+
public function getEnvironmentVariables()
{
return $this->environmentVariables->getVariables();
@@ -192,7 +211,7 @@
{
return $this->commandLine->getOption($option);
}
-
+
public function hasEnvironmentVariable($name)
{
return $this->environmentVariables->hasVariable($name);
@@ -209,7 +228,7 @@
{
$this->environmentVariables->setVariable($name, $value);
}
-
+
public function getTestFilename()
{
return $this->commandLine->getTestFilename();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php