Skip to content

Commit 78bc144

Browse files
committed
MQE-783 working prototype
1 parent dcd1eca commit 78bc144

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

src/Magento/FunctionalTestingFramework/Allure/Adapter/MagentoAllureAdapter.php

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
class MagentoAllureAdapter extends AllureAdapter
2323
{
24+
private $uuid;
25+
2426
/**
2527
* Variable name used for extracting group argument to codecept run commaned
2628
*
@@ -81,19 +83,41 @@ function () use ($suite, $suiteName) {
8183
$suite
8284
));
8385

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);
94119
}
95120

96121

97-
public function suiteAfter()
98122
}
99123

0 commit comments

Comments
 (0)