Skip to content

Commit d317496

Browse files
[Process] fix test case
1 parent 45d288a commit d317496

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Process/PhpExecutableFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function find($includeArgs = true)
6262
}
6363
}
6464

65-
if (is_executable($php = PHP_BINDIR.'/php'.('\\' === DIRECTORY_SEPARATOR ? '.exe' : ''))) {
65+
if (is_executable($php = PHP_BINDIR.('\\' === DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) {
6666
return $php;
6767
}
6868

src/Symfony/Component/Process/Tests/PhpExecutableFinderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function testFindWithSuffix()
9494
//TODO maybe php executable is custom or even Windows
9595
if ('\\' === DIRECTORY_SEPARATOR) {
9696
$this->assertTrue(is_executable($current));
97-
$this->assertTrue((bool) preg_match('/'.addslashes(DIRECTORY_SEPARATOR).'php\.(exe|bat|cmd|com)$/i', $current), '::find() returns the executable PHP with suffixes');
97+
$this->assertRegExp('/\\\\php\.(exe|bat|cmd|com)$/i', $current, '::find() returns the executable PHP with suffixes');
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)