[Process] add tests for php executable finder if file does not exist
This commit is contained in:
parent
f0a6de2736
commit
2b62dc3fc5
@ -69,4 +69,16 @@ class PhpExecutableFinderTest extends TestCase
|
||||
$this->assertEquals($f->findArguments(), [], '::findArguments() returns no arguments');
|
||||
}
|
||||
}
|
||||
|
||||
public function testNotExitsBinaryFile()
|
||||
{
|
||||
$f = new PhpExecutableFinder();
|
||||
$phpBinaryEnv = PHP_BINARY;
|
||||
putenv('PHP_BINARY=/usr/local/php/bin/php-invalid');
|
||||
|
||||
$this->assertFalse($f->find(), '::find() returns false because of not exist file');
|
||||
$this->assertFalse($f->find(false), '::find(false) returns false because of not exist file');
|
||||
|
||||
putenv('PHP_BINARY='.$phpBinaryEnv);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user