com phpruntests: possible fix to cgi test: tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
| From: | David Soria Parra | Date: | Wed, 15 Jul 2009 12:02:47 +0000 |
| Subject: | com phpruntests: possible fix to cgi test: tests/configuration/settings/rtPhpCgiExecutableSettingTest.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66343@lists.php.net to get a copy of this message | ||
Commit: 919e3d340d60eadc164406fe69fa8adbe7100eb8
Author: Zoe Slattery <zoe@php.net> Wed, 15 Jul 2009 12:02:47 +0000
Parents: 374a8bbd3172da377e73b6fcd6e03991f01a7c78
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=919e3d340d60eadc164406fe69fa8adbe7100eb8
Log:
possible fix to cgi test
Changed paths:
M tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
Diff:
diff --git a/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
b/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
index e8e3f69..1412098 100644
--- a/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
+++ b/tests/configuration/settings/rtPhpCgiExecutableSettingTest.php
@@ -25,8 +25,14 @@ class rtPhpCgiExecutableSettingTest extends PHPUnit_Framework_TestCase
$configuration = rtRuntestsConfiguration::getInstance(array('run-tests.php',
'test.phpt'));
$configuration->setEnvironmentVariable('TEST_PHP_CGI_EXECUTABLE',
'');
$setting = new rtPhpCgiExecutableSetting($configuration);
-
- $this->assertEquals(null, $setting->get());
+
+ $setPhp = $configuration->getSetting('TEST_PHP_EXECUTABLE');
+
+ if (preg_match("/sapi/", $setPhp)) {
+ // Make no assertion bacuse the CGI executable can be guesed
+ } else {
+ $this->assertEquals(null, $setting->get());
+ }
}
public function testSetFromCliExecutableName() {