示例#1
0
 /**
  * Prints feature footer on AFTER event.
  *
  * @param Formatter $formatter
  * @param Event     $event
  */
 private function printFooterOnAfterEvent(Formatter $formatter, Event $event)
 {
     if (!$event instanceof AfterFeatureTested) {
         return;
     }
     $this->setupPrinter->printTeardown($formatter, $event->getTeardown());
     $this->featurePrinter->printFooter($formatter, $event->getTestResult());
 }
 /**
  * Prints the feature on AFTER event.
  *
  * @param Formatter $formatter
  * @param Event     $event
  */
 public function printFeatureOnAfterEvent(Formatter $formatter, Event $event)
 {
     if (!$event instanceof AfterFeatureTested) {
         return;
     }
     $this->featurePrinter->printHeader($formatter, $this->beforeFeatureTestedEvent);
     foreach ($this->afterScenarioTestedEvents as $afterScenario) {
         $afterScenarioTested = $afterScenario['event'];
         $this->scenarioPrinter->printOpenTag($formatter, $afterScenarioTested->getFeature(), $afterScenarioTested->getScenario(), $afterScenarioTested->getTestResult());
         foreach ($afterScenario['step_events'] as $afterStepTested) {
             $this->stepPrinter->printStep($formatter, $afterScenarioTested->getScenario(), $afterStepTested->getStep(), $afterStepTested->getTestResult());
         }
     }
     $this->featurePrinter->printFooter($formatter, $event->getTestResult());
     $this->afterScenarioTestedEvents = array();
 }