Пример #1
0
 /**
  * Hook, called from "BrowserTestCase::run" method.
  *
  * @param TestEndedEvent $event Test ended event.
  *
  * @return void
  */
 public function onTestEnded(TestEndedEvent $event)
 {
     if (!$event->validateSubscriber($this->getTestCase())) {
         return;
     }
     $this->detachFromTestCase();
 }
 /**
  * Hook, called from "BrowserTestCase::run" method.
  *
  * @param TestEndedEvent $event Test ended event.
  *
  * @return void
  */
 public function onTestEnded(TestEndedEvent $event)
 {
     if (!$event->validateSubscriber($this->getTestCase())) {
         return;
     }
     parent::onTestEnded($event);
     $session = $event->getSession();
     if ($session === null || !$session->isStarted()) {
         // Session wasn't used in particular test.
         return;
     }
     $test_case = $event->getTestCase();
     $this->getAPIClient()->updateStatus($this->getSessionId($session), $this->getTestStatus($test_case, $event->getTestResult()));
 }