PhpBench\Benchmark\Remote\Payload::setWrapper PHP Method

setWrapper() public method

public setWrapper ( $wrapper )
    public function setWrapper($wrapper)
    {
        $this->wrapper = $wrapper;
    }

Usage Example

Example #1
0
 /**
  * It should allow the PHP executable to be wrapped with a different executable.
  */
 public function testWrap()
 {
     $process = $this->prophesize('Symfony\\Component\\Process\\Process');
     $payload = new Payload(__DIR__ . '/template/foo.template', array(), $process->reveal());
     $payload->setWrapper('bockfire');
     $payload->setPhpPath('/boo/bar/php');
     $process->setCommandLine(Argument::containingString('bockfire /boo/bar/php'))->shouldBeCalled();
     $process->run()->shouldBeCalled();
     $process->isSuccessful()->willReturn(true);
     $process->getOutput()->willReturn('{"foo": "bar"}');
     $payload->launch($payload);
 }