Skip to content

Commit 8943a4c

Browse files
committed
MQE-580: [Unit Test] CestObjectHandler.php
- fix CR comments
1 parent d2920c8 commit 8943a4c

File tree

1 file changed

+52
-50
lines changed

1 file changed

+52
-50
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Test/Handlers/CestObjectHandlerTest.php

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
use AspectMock\Test as AspectMock;
1010

11-
use Go\Aop\Aspect;
1211
use Magento\FunctionalTestingFramework\ObjectManager;
1312
use Magento\FunctionalTestingFramework\ObjectManagerFactory;
1413
use Magento\FunctionalTestingFramework\Test\Handlers\CestObjectHandler;
@@ -72,33 +71,34 @@ class CestObjectHandlerTest extends TestCase
7271
public function testGetCestObject()
7372
{
7473
// set up mock data
75-
$mockData = [CestObjectExtractor::CEST_ROOT => [
76-
$this->testCestName => [
77-
CestObjectExtractor::NAME => $this->testCestName,
78-
CestObjectExtractor::CEST_BEFORE_HOOK => [
79-
$this->testActionBeforeName => [
80-
ActionObjectExtractor::NODE_NAME => $this->testActionType,
81-
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testActionBeforeName
82-
]
83-
],
84-
CestObjectExtractor::CEST_AFTER_HOOK => [
85-
$this->testActionAfterName => [
86-
ActionObjectExtractor::NODE_NAME => $this->testActionType,
87-
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testActionAfterName
74+
$mockData = [
75+
CestObjectExtractor::CEST_ROOT => [
76+
$this->testCestName => [
77+
CestObjectExtractor::NAME => $this->testCestName,
78+
CestObjectExtractor::CEST_BEFORE_HOOK => [
79+
$this->testActionBeforeName => [
80+
ActionObjectExtractor::NODE_NAME => $this->testActionType,
81+
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testActionBeforeName
82+
]
83+
],
84+
CestObjectExtractor::CEST_AFTER_HOOK => [
85+
$this->testActionAfterName => [
86+
ActionObjectExtractor::NODE_NAME => $this->testActionType,
87+
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testActionAfterName
8888

89-
]
90-
],
91-
CestObjectExtractor::CEST_ANNOTATIONS => [
92-
'group' => [['value' => 'test']]
93-
],
94-
$this->testTestName => [
95-
$this->testTestActionName => [
96-
ActionObjectExtractor::NODE_NAME => $this->testActionType,
97-
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
89+
]
90+
],
91+
CestObjectExtractor::CEST_ANNOTATIONS => [
92+
'group' => [['value' => 'test']]
9893
],
94+
$this->testTestName => [
95+
$this->testTestActionName => [
96+
ActionObjectExtractor::NODE_NAME => $this->testActionType,
97+
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
98+
],
99+
]
99100
]
100101
]
101-
]
102102
];
103103

104104
$this->setMockParserOutput($mockData);
@@ -149,38 +149,40 @@ public function testGetCestObject()
149149
public function testGetCestsByGroup()
150150
{
151151
// set up mock data
152-
$mockData = [CestObjectExtractor::CEST_ROOT => [
153-
$this->testCestName => [
154-
CestObjectExtractor::NAME => $this->testCestName,
155-
CestObjectExtractor::CEST_ANNOTATIONS => [
156-
'group' => [['value' => 'test']]
157-
],
158-
$this->testTestName => [
159-
$this->testTestActionName => [
160-
ActionObjectExtractor::NODE_NAME => $this->testActionType,
161-
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
162-
],
163-
]
164-
],
165-
$this->testCestName . '2' => [
166-
CestObjectExtractor::NAME => $this->testCestName . '2',
167-
$this->testTestName . 'Include' => [
168-
TestObjectExtractor::TEST_ANNOTATIONS => [
152+
$mockData = [
153+
CestObjectExtractor::CEST_ROOT => [
154+
$this->testCestName => [
155+
CestObjectExtractor::NAME => $this->testCestName,
156+
CestObjectExtractor::CEST_ANNOTATIONS => [
169157
'group' => [['value' => 'test']]
170158
],
171-
$this->testTestActionName => [
172-
ActionObjectExtractor::NODE_NAME => $this->testActionType,
173-
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
174-
],
159+
$this->testTestName => [
160+
$this->testTestActionName => [
161+
ActionObjectExtractor::NODE_NAME => $this->testActionType,
162+
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
163+
],
164+
]
175165
],
176-
$this->testTestName . 'Exclude' => [
177-
$this->testTestActionName => [
178-
ActionObjectExtractor::NODE_NAME => $this->testActionType,
179-
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
166+
$this->testCestName . '2' => [
167+
CestObjectExtractor::NAME => $this->testCestName . '2',
168+
$this->testTestName . 'Include' => [
169+
TestObjectExtractor::TEST_ANNOTATIONS => [
170+
'group' => [['value' => 'test']]
171+
],
172+
$this->testTestActionName => [
173+
ActionObjectExtractor::NODE_NAME => $this->testActionType,
174+
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
175+
],
180176
],
177+
$this->testTestName . 'Exclude' => [
178+
$this->testTestActionName => [
179+
ActionObjectExtractor::NODE_NAME => $this->testActionType,
180+
ActionObjectExtractor::TEST_STEP_MERGE_KEY => $this->testTestActionName
181+
],
182+
]
181183
]
182184
]
183-
]];
185+
];
184186

185187
$this->setMockParserOutput($mockData);
186188

0 commit comments

Comments
 (0)