コード例 #1
0
ファイル: PhpSpock.php プロジェクト: aleczhang/phpspock
 public function run($test)
 {
     $parser = new SpecificationParser();
     $testSpec = $parser->parse($test);
     $testSpec->setEventDispatcher($this->getEventDispatcher());
     try {
         return $testSpec->run();
     } catch (TestExecutionException $e) {
         $newEx = new TestExecutionException('Test failed: ' . $testSpec->getFile() . ' on line ' . $testSpec->getStartLine() . "\n" . get_class($e) . ': ' . $e->getMessage(), 0, $e);
         throw $newEx;
     }
 }