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; }
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; }
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; }
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; }
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; }