tests find() with the env var PHP_PATH
public function testFindWithPhpPath() {
if (defined('PHP_BINARY')) {
$this
->markTestSkipped('The PHP binary is easily available as of PHP 5.4');
}
$f = new PhpExecutableFinder();
$current = $f
->find();
//not executable PHP_PATH
putenv('PHP_PATH=/not/executable/php');
$this
->assertFalse($f
->find(), '::find() returns false for not executable php');
//executable PHP_PATH
putenv('PHP_PATH=' . $current);
$this
->assertEquals($f
->find(), $current, '::find() returns the executable php');
}