[Process] fix test case

This commit is contained in:
Nicolas Grekas 2018-02-12 15:17:16 +01:00
parent 45d288a4ae
commit d317496b6b
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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');
}
}
}