|
21 | 21 |
|
22 | 22 | class MagentoAllureAdapter extends AllureAdapter
|
23 | 23 | {
|
| 24 | + private $uuid; |
| 25 | + |
24 | 26 | /**
|
25 | 27 | * Variable name used for extracting group argument to codecept run commaned
|
26 | 28 | *
|
@@ -81,19 +83,41 @@ function () use ($suite, $suiteName) {
|
81 | 83 | $suite
|
82 | 84 | ));
|
83 | 85 |
|
84 |
| - $event = new TestSuiteStartedEvent($suiteName); |
85 |
| - if (class_exists($suiteName, false)) { |
86 |
| - $annotationManager = new Annotation\AnnotationManager( |
87 |
| - Annotation\AnnotationProvider::getClassAnnotations($suiteName) |
88 |
| - ); |
89 |
| - $annotationManager->updateTestSuiteEvent($event); |
90 |
| - } |
91 |
| - $this->uuid = $event->getUuid(); |
92 |
| - $this->getLifecycle()->fire($event); |
93 |
| - // unset($event); |
| 86 | + //change suiteEvent |
| 87 | + $changeSuiteEvent = new SuiteEvent( |
| 88 | + $suiteEvent->getSuite(), |
| 89 | + $suiteEvent->getResult(), |
| 90 | + $suiteEvent->getSettings() |
| 91 | + ); |
| 92 | + |
| 93 | + // call parent function |
| 94 | + parent::suiteBefore($changeSuiteEvent); |
| 95 | +// |
| 96 | +// $event = new TestSuiteStartedEvent($suiteName); |
| 97 | +// if (class_exists($suiteName, false)) { |
| 98 | +// $annotationManager = new Annotation\AnnotationManager( |
| 99 | +// Annotation\AnnotationProvider::getClassAnnotations($suiteName) |
| 100 | +// ); |
| 101 | +// $annotationManager->updateTestSuiteEvent($event); |
| 102 | +// } |
| 103 | +// |
| 104 | +//// $uuid = ""; |
| 105 | +// $uuid = call_user_func(\Closure::bind( |
| 106 | +// function () use ($uuid, $event) { |
| 107 | +// return $this->uuid; |
| 108 | +// }, |
| 109 | +// null, |
| 110 | +// $this |
| 111 | +// )); |
| 112 | +//// $this->uuid = $uuid; |
| 113 | +// |
| 114 | +// $this->uuid = $event->getUuid(); |
| 115 | +// |
| 116 | +// |
| 117 | +// $this->getLifecycle()->fire($event); |
| 118 | +// // unset($event); |
94 | 119 | }
|
95 | 120 |
|
96 | 121 |
|
97 |
| - public function suiteAfter() |
98 | 122 | }
|
99 | 123 |
|
0 commit comments