[Process] PhpExecutableFinder: add regression test
This commit is contained in:
parent
4e1fffe016
commit
576f802917
@ -43,7 +43,27 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* tests find() with the env var PHP_PATH.
|
||||
* tests find() with the constant PHP_BINARY.
|
||||
*
|
||||
* @requires PHP 5.4
|
||||
*/
|
||||
public function testFind()
|
||||
{
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$this->markTestSkipped('Should not be executed in HHVM context.');
|
||||
}
|
||||
|
||||
$f = new PhpExecutableFinder();
|
||||
|
||||
$current = PHP_BINARY;
|
||||
$args = 'phpdbg' === PHP_SAPI ? ' -qrr' : '';
|
||||
|
||||
$this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP');
|
||||
$this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
|
||||
}
|
||||
|
||||
/**
|
||||
* tests find() with the env var / constant PHP_BINARY with HHVM.
|
||||
*/
|
||||
public function testFindWithHHVM()
|
||||
{
|
||||
|
Reference in New Issue
Block a user