public function testUpdateTestSuiteStartedEvent()
 {
     $instance = new Fixtures\ExampleTestSuite();
     $testSuiteAnnotations = AnnotationProvider::getClassAnnotations($instance);
     $annotationManager = new AnnotationManager($testSuiteAnnotations);
     $event = new TestSuiteStartedEvent('some-name');
     $annotationManager->updateTestSuiteEvent($event);
     $this->assertEquals('test-suite-title', $event->getTitle());
     $this->assertEquals('test-suite-description', $event->getDescription()->getValue());
     $this->assertEquals(DescriptionType::MARKDOWN, $event->getDescription()->getType());
     $this->assertEquals(6, sizeof($event->getLabels()));
     //Check features presence
     $features = $this->getLabelsByType($event->getLabels(), LabelType::FEATURE);
     $this->assertEquals(2, sizeof($features));
     $index = 1;
     foreach ($features as $feature) {
         $this->assertInstanceOf('Yandex\\Allure\\Adapter\\Model\\Label', $feature);
         $this->assertEquals("test-suite-feature{$index}", $feature->getValue());
         $index++;
     }
     //Check stories presence
     $stories = $this->getLabelsByType($event->getLabels(), LabelType::STORY);
     $this->assertEquals(2, sizeof($stories));
     $index = 1;
     foreach ($stories as $story) {
         $this->assertInstanceOf('Yandex\\Allure\\Adapter\\Model\\Label', $story);
         $this->assertEquals("test-suite-story{$index}", $story->getValue());
         $index++;
     }
     //Check issues presence
     $issues = $this->getLabelsByType($event->getLabels(), LabelType::ISSUE);
     $this->assertEquals(2, sizeof($issues));
     $index = 1;
     foreach ($issues as $issue) {
         $this->assertInstanceOf('Yandex\\Allure\\Adapter\\Model\\Label', $issue);
         $this->assertEquals("test-suite-issue{$index}", $issue->getValue());
         $index++;
     }
 }
 /**
  * A test suite started.
  *
  * @param PHPUnit_Framework_TestSuite $suite
  * @since  Method available since Release 2.2.0
  */
 public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
 {
     if ($suite instanceof \PHPUnit_Framework_TestSuite_DataProvider) {
         return;
     }
     $suiteName = $suite->getName();
     $event = new TestSuiteStartedEvent($suiteName);
     $this->uuid = $event->getUuid();
     $this->suiteName = $suiteName;
     if (class_exists($suiteName, false)) {
         $annotationManager = new Annotation\AnnotationManager(Annotation\AnnotationProvider::getClassAnnotations($suiteName));
         $annotationManager->updateTestSuiteEvent($event);
     }
     Allure::lifecycle()->fire($event);
 }
 public function suiteBefore(SuiteEvent $suiteEvent)
 {
     $suite = $suiteEvent->getSuite();
     $suiteName = $suite->getName();
     $event = new TestSuiteStartedEvent($suiteName);
     if (class_exists($suiteName)) {
         $annotationManager = new Annotation\AnnotationManager(Annotation\AnnotationProvider::getClassAnnotations(get_class($suite)));
         $annotationManager->updateTestSuiteEvent($event);
     }
     $this->uuid = $event->getUuid();
     $this->getLifecycle()->fire($event);
 }