コード例 #1
0
 /**
  * @param Formatter $formatter
  * @param Event     $event
  */
 private function printFooterOnAfterSuiteTestedEvent(Formatter $formatter, Event $event)
 {
     if (!$event instanceof AfterSuiteTested) {
         return;
     }
     $this->suitePrinter->printFooter($formatter, $event->getSuite());
 }
コード例 #2
0
 protected function getTestName(Event $e)
 {
     if ($e instanceof TestEvent || $e instanceof FailEvent) {
         $test = $e->getTest();
         return method_exists($test, 'getSignature') ? $test->getSignature() : get_class($test) . ":{$test->getName(false)}";
     } elseif ($e instanceof SuiteEvent) {
         return $e->getSuite()->getName();
     } else {
         return $e->getName();
     }
 }