The scripts should return a JSON encoded string.
Ejemplo n.º 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']);
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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'));
 }