minor #26150 [Process] fix test case (nicolas-grekas)
This PR was merged into the 2.7 branch.
Discussion
----------
[Process] fix test case
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
d317496
[Process] fix test case
This commit is contained in:
commit
72183106cd
@ -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