cvs: phpruntests /tests/configuration/settings rtCurrentDirectorySettingTest.php rtPhpCgiExecutableSettingTest.php rtPhpExecutableSettingTest.php
| From: | Zoe Slattery | Date: | Sun, 26 Apr 2009 06:54:34 +0000 |
| Subject: | cvs: phpruntests /tests/configuration/settings rtCurrentDirectorySettingTest.php rtPhpCgiExecutableSettingTest.php rtPhpExecutableSettingTest.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-57306@lists.php.net to get a copy of this message | ||
zoe Sun Apr 26 06:54:34 2009 UTC
Modified files:
/phpruntests/tests/configuration/settings
rtPhpExecutableSettingTest.php
rtCurrentDirectorySettingTest.php
rtPhpCgiExecutableSettingTest.php
Log:
Changes to the wy that the CGI executable is set
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php?r1=1.3&r2=1.4&diff_format=u
Index: phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php
diff -u phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php:1.3
phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php:1.4
--- phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php:1.3 Fri Apr 24 09:42:01
2009
+++ phpruntests/tests/configuration/settings/rtPhpExecutableSettingTest.php Sun Apr 26 06:54:34 2009
@@ -24,14 +24,22 @@
$this->assertEquals('a-php-executable', $clisetting->get());
}
- public function testSetPhpExecutableEVAuto()
+ public function testSetPhpExecutableEvAuto()
{
$configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'test.phpt'));
$configuration->setEnvironmentVariable('TEST_PHP_EXECUTABLE',
'auto');
+ $configuration->setEnvironmentVariable('TEST_PHP_SRCDIR',
'/some/directory');
+ $configuration->configure();
+ $this->assertEquals('/some/directory/sapi/cli/php',
$configuration->getSetting('PhpExecutable'));
+ }
- $clisetting = new rtPhpExecutableSetting($configuration);
+ public function testSetPhpExecutableCwdAuto()
+ {
+ $configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'test.phpt'));
+ $configuration->setEnvironmentVariable('TEST_PHP_EXECUTABLE',
'auto');
+ $configuration->configure();
- $this->assertEquals('WORKING_DIR/sapi/cli/php', $clisetting->get());
+ $this->assertEquals(realpath(getcwd()).'/sapi/cli/php',
$configuration->getSetting('PhpExecutable'));
}
}
?>
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php?r1=1.2&r2=1.3&diff_format=u
Index: phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php
diff -u phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php:1.2
phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php:1.3
--- phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php:1.2 Mon Apr 20
20:50:39 2009
+++ phpruntests/tests/configuration/settings/rtCurrentDirectorySettingTest.php Sun Apr 26 06:54:34
2009
@@ -10,7 +10,7 @@
$configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'-p', 'a-php-exe', 'test.phpt'));
$dirsetting = new rtCurrentDirectorySetting($configuration);
- $this->assertEquals(getcwd(), $dirsetting->get());
+ $this->assertEquals(realpath(getcwd()), $dirsetting->get());
}
}
?>
http://cvs.php.net/viewvc.cgi/phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php?r1=1.3&r2=1.4&diff_format=u
Index: phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
diff -u phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php:1.3
phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php:1.4
--- phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php:1.3 Sat Apr 25
17:18:37 2009
+++ phpruntests/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php Sun Apr 26 06:54:34
2009
@@ -8,34 +8,26 @@
public function testSetPhpCgiExecutableEV() {
$configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'test.phpt'));
$configuration->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',
'a-php-executable');
-
$cgisetting = new rtPhpCgiExecutableSetting($configuration);
-
$this->assertEquals('a-php-executable', $cgisetting->get());
}
public function testSetPhpCgiExecutableEVAuto() {
- $configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'test.phpt'));
+ $configuration =
rtRuntestsConfiguration::getInstance(array('run-tests.php','-p',
'a-php-exe', 'test.phpt'));
$configuration->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',
'auto');
-
- $cgisetting = new rtPhpCgiExecutableSetting($configuration);
-
- $this->assertEquals('WORKING_DIR/sapi/cgi/php', $cgisetting->get());
+ $configuration->configure();
+ $this->assertEquals(realpath(getcwd()).'/sapi/cgi/php',
$configuration->getSetting('PhpCgiExecutable'));
}
public function testSetPhpCgiExecutableNotSet() {
$configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'test.phpt'));
-
$cgisetting = new rtPhpCgiExecutableSetting($configuration);
-
$this->assertEquals(null, $cgisetting->get());
}
- public function testSetFromCliExecutableName() {
-
+ public function testSetFromCliExecutableName() {
$config = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'-p', '/a/sapi/cli/a-php-exe', 'test.phpt'));
$config->configure();
-
$this->assertEquals('/a/sapi/cgi/php',
$config->getSetting('PhpCgiExecutable'));
}
}