19
19
20
20
class MagentoAllureAdapter extends AllureAdapter
21
21
{
22
- /**
23
- * Variable name used for extracting group argument to codecept run commaned
24
- *
25
- * @var string
26
- */
27
- protected $ groupKey = "groups " ;
28
-
29
- /**
30
- * Array of group values from test runner command to append to allure suitename
31
- *
32
- * @var array
33
- */
34
- protected $ group ;
35
-
36
- /**
37
- * Initialize from parent with group value
38
- *
39
- * @param array $ignoredAnnotations
40
- * @return void
41
- */
42
-
43
- // @codingStandardsIgnoreStart
44
- public function _initialize (array $ ignoredAnnotations = [])
45
- {
46
- $ this ->group = $ this ->getGroup ($ this ->groupKey );
47
- parent ::_initialize ($ ignoredAnnotations );
48
- }
49
- // @codingStandardsIgnoreEnd
50
-
51
22
/**
52
23
* Array of group values passed to test runner command
53
24
*
54
- * @param String $groupKey
55
25
* @return String
56
26
*/
57
- private function getGroup ($ groupKey )
27
+ private function getGroup ()
58
28
{
59
- if (!( $ this ->options [$ groupKey ] == Null )) {
60
- return $ this ->options [$ groupKey ][0 ];
29
+ if ( $ this ->options [' groups ' ] != null ) {
30
+ return $ this ->options [' groups ' ][0 ];
61
31
}
62
32
return null ;
63
33
}
@@ -72,9 +42,9 @@ public function suiteBefore(SuiteEvent $suiteEvent)
72
42
{
73
43
$ changeSuiteEvent = $ suiteEvent ;
74
44
75
- if ($ this ->group != null ) {
45
+ if ($ this ->getGroup () != null ) {
76
46
$ suite = $ suiteEvent ->getSuite ();
77
- $ suiteName = ($ suite ->getName ()) . "- {$ this ->group }" ;
47
+ $ suiteName = ($ suite ->getName ()) . "- {$ this ->getGroup () }" ;
78
48
79
49
call_user_func (\Closure::bind (
80
50
function () use ($ suite , $ suiteName ) {
0 commit comments