コード例 #1
0
ファイル: TestCase.php プロジェクト: NaszvadiG/ImageCMS
 public function runStep(\Codeception\Step $step)
 {
     $this->trace[] = $step;
     $this->fire('step.before', new \Codeception\Event\Step($this, $step));
     try {
         $result = $step->run();
     } catch (\Exception $e) {
         $this->fire('step.after', new \Codeception\Event\Step($this, $step));
         throw $e;
     }
     $this->fire('step.after', new \Codeception\Event\Step($this, $step));
     return $result;
 }
コード例 #2
0
ファイル: Actor.php プロジェクト: codeception/base
 public function runStep(Step $step)
 {
     $result = null;
     $this->fire(Events::STEP_BEFORE, new StepEvent($this, $step));
     try {
         $result = $step->run($this->moduleContainer);
     } catch (ConditionalAssertionFailed $f) {
         $this->testResult->addFailure(clone $this, $f, $this->testResult->time());
     } catch (\Exception $e) {
         $this->fire(Events::STEP_AFTER, new StepEvent($this, $step));
         throw $e;
     }
     $this->fire(Events::STEP_AFTER, new StepEvent($this, $step));
     return $result;
 }
コード例 #3
0
ファイル: TestCase.php プロジェクト: lenninsanchez/donadores
 public function runStep(\Codeception\Step $step)
 {
     $this->trace[] = $step;
     $this->fire('step.before', new \Codeception\Event\Step($this, $step));
     try {
         $result = $step->run();
     } catch (ConditionalAssertionFailed $f) {
         $result = $this->getTestResultObject();
         $result->addFailure(clone $this, $f, $result->time());
     } catch (\Exception $e) {
         $this->fire('step.after', new \Codeception\Event\Step($this, $step));
         throw $e;
     }
     $this->fire('step.after', new \Codeception\Event\Step($this, $step));
     return $result;
 }
コード例 #4
0
ファイル: Actor.php プロジェクト: itillawarra/cmfive
 public function runStep(Step $step)
 {
     $this->trace[] = $step;
     $this->fire(Events::STEP_BEFORE, new StepEvent($this, $step));
     try {
         $result = $step->run();
     } catch (ConditionalAssertionFailed $f) {
         $result = $this->getTestResultObject();
         $result->addFailure(clone $this, $f, $result->time());
     } catch (\Exception $e) {
         $this->fire(Events::STEP_AFTER, new StepEvent($this, $step));
         throw $e;
     }
     $this->fire(Events::STEP_AFTER, new StepEvent($this, $step));
     return $result;
 }
コード例 #5
0
ファイル: Scenario.php プロジェクト: foxman209/Codeception
 public function runStep(Step $step)
 {
     $this->steps[] = $step;
     $result = null;
     $this->metadata->getService('dispatcher')->dispatch(Events::STEP_BEFORE, new StepEvent($this->test, $step));
     try {
         $result = $step->run($this->metadata->getService('modules'));
     } catch (ConditionalAssertionFailed $f) {
         $result = $this->test->getTestResultObject();
         $result->addFailure(clone $this->test, $f, $result->time());
     } catch (\Exception $e) {
         $this->metadata->getService('dispatcher')->dispatch(Events::STEP_AFTER, new StepEvent($this->test, $step));
         throw $e;
     }
     $this->metadata->getService('dispatcher')->dispatch(Events::STEP_AFTER, new StepEvent($this->test, $step));
     $step->executed = true;
     return $result;
 }