payload() 공개 메소드

public payload ( $template, array $tokens )
$tokens array
예제 #1
0
 /**
  * It should throw an exception if the bootstrap file does not exist.
  *
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Bootstrap file
  */
 public function testInvalidBootstrap()
 {
     $launcher = new Launcher($this->factory->reveal(), $this->finder->reveal(), __DIR__ . '/../../../../vendor/notexisting.php');
     $launcher->payload(__DIR__ . '/template/foo.template', ['foo' => 'bar']);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function executeMethods(BenchmarkMetadata $benchmark, array $methods)
 {
     $tokens = array('class' => $benchmark->getClass(), 'file' => $benchmark->getPath(), 'methods' => var_export($methods, true));
     $payload = $this->launcher->payload(__DIR__ . '/template/benchmark_static_methods.template', $tokens);
     $payload->launch();
 }
예제 #3
0
 /**
  * It should throw an exception if the bootstrap file does not exist.
  *
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Bootstrap file
  */
 public function testInvalidBootstrap()
 {
     $launcher = new Launcher(__DIR__ . '/../../../../vendor/notexisting.php');
     $launcher->payload(__DIR__ . '/template/foo.template', array('foo' => 'bar'));
 }