8000 minor #16606 [Process] PhpExecutableFinder: add regression test (ogiz… · jeremyFreeAgent/symfony@551d164 · GitHub
[go: up one dir, main page]

Skip to content

Commit 551d164

Browse files
committed
minor symfony#16606 [Process] PhpExecutableFinder: add regression test (ogizanagi)
This PR was merged into the 2.8 branch. Discussion ---------- [Process] PhpExecutableFinder: add regression test | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#16599 | License | MIT | Doc PR | - I guess it won't be a shame to have this simple test after symfony#16599 . Commits ------- 576f802 [Process] PhpExecutableFinder: add regression test
2 parents 922b946 + 576f802 commit 551d164

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,27 @@ public function testFindWithPhpPath()
4343
}
4444

4545
/**
46-
* tests find() with the env var PHP_PATH.
46+
* tests find() with the constant PHP_BINARY.
47+
*
48+
* @requires PHP 5.4
49+
*/
50+
public function testFind()
51+
{
52+
if (defined('HHVM_VERSION')) {
53+
$this->markTestSkipped('Should not be executed in HHVM context.');
54+
}
55+
56+
$f = new PhpExecutableFinder();
57+
58+
$current = PHP_BINARY;
59+
$args = 'phpdbg' === PHP_SAPI ? ' -qrr' : '';
60+
61+
$this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP');
62+
$this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
63+
}
5595 64+
65+
/**
66+
* tests find() with the env var / constant PHP_BINARY with HHVM.
4767
*/
4868
public function testFindWithHHVM()
4969
{

0 commit comments

Comments
 (0)
0