[Process] fix test case
This commit is contained in:
parent
45d288a4ae
commit
d317496b6b
@ -62,7 +62,7 @@ class PhpExecutableFinder
|
||||
}
|
||||
}
|
||||
|
||||
if (is_executable($php = PHP_BINDIR.'/php'.('\\' === DIRECTORY_SEPARATOR ? '.exe' : ''))) {
|
||||
if (is_executable($php = PHP_BINDIR.('\\' === DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) {
|
||||
return $php;
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ class PhpExecutableFinderTest extends TestCase
|
||||
//TODO maybe php executable is custom or even Windows
|
||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||
$this->assertTrue(is_executable($current));
|
||||
$this->assertTrue((bool) preg_match('/'.addslashes(DIRECTORY_SEPARATOR).'php\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable PHP with suffixes');
|
||||
$this->assertRegExp('/\\\\php\.(exe|bat|cmd|com)$/i', $current, '::find() returns the executable PHP with suffixes');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user