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

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

It should pass PHP ini settings to the PHP executable.
public testPhpConfig ( )
    public function testPhpConfig()
    {
        $process = $this->prophesize(Process::class);
        $payload = new Payload(__DIR__ . '/template/foo.template', [], null, $process->reveal());
        $payload->setPhpConfig(['foo' => 'bar', 'bar' => 'foo']);
        $process->setCommandLine(Argument::containingString('-dfoo=bar'))->shouldBeCalled();
        $process->setCommandLine(Argument::containingString('-dbar=foo'))->shouldBeCalled();
        $process->run()->shouldBeCalled();
        $process->isSuccessful()->willReturn(true);
        $process->getOutput()->willReturn('{"foo": "bar"}');
        $payload->launch($payload);
    }