PhpBench\Tests\Unit\Benchmark\Remote\PayloadTest::testBinaryPath PHP Метод

testBinaryPath() публичный Метод

It should customize the PHP binary path.
public testBinaryPath ( )
    public function testBinaryPath()
    {
        $process = $this->prophesize(Process::class);
        $payload = new Payload(__DIR__ . '/template/foo.template', [], null, $process->reveal());
        $payload->setPhpPath('/foo/bar');
        $process->setCommandLine(Argument::containingString('/foo/bar'))->shouldBeCalled();
        $process->run()->shouldBeCalled();
        $process->isSuccessful()->willReturn(true);
        $process->getOutput()->willReturn('{"foo": "bar"}');
        $payload->launch($payload);
    }