|
9 | 9 | use AspectMock\Test as AspectMock;
|
10 | 10 |
|
11 | 11 | use Magento\FunctionalTestingFramework\Test\Objects\ActionObject;
|
| 12 | +use Magento\FunctionalTestingFramework\Test\Objects\TestHookObject; |
12 | 13 | use Magento\FunctionalTestingFramework\Test\Objects\TestObject;
|
13 | 14 | use Magento\FunctionalTestingFramework\Util\MagentoTestCase;
|
14 | 15 | use Magento\FunctionalTestingFramework\Util\TestGenerator;
|
@@ -76,14 +77,20 @@ public function testAllowSkipped()
|
76 | 77 | $actionObject = new ActionObject('fakeAction', 'comment', [
|
77 | 78 | 'userInput' => $actionInput
|
78 | 79 | ]);
|
| 80 | + $beforeActionInput = 'beforeInput'; |
| 81 | + $beforeActionObject = new ActionObject('beforeAction', 'comment', [ |
| 82 | + 'userInput' => $beforeActionInput |
| 83 | + ]); |
79 | 84 |
|
80 | 85 | $annotations = ['skip' => ['issue']];
|
81 |
| - $testObject = new TestObject("sampleTest", ["merge123" => $actionObject], $annotations, [], "filename"); |
| 86 | + $beforeHook = new TestHookObject("before", "sampleTest", ['beforeAction' => $beforeActionObject]); |
| 87 | + $testObject = new TestObject("sampleTest", ["fakeAction" => $actionObject], $annotations, ["before" => $beforeHook], "filename"); |
82 | 88 |
|
83 | 89 | $testGeneratorObject = TestGenerator::getInstance("", ["sampleTest" => $testObject]);
|
84 | 90 | $output = $testGeneratorObject->assembleTestPhp($testObject);
|
85 | 91 |
|
86 | 92 | $this->assertNotContains('This test is skipped', $output);
|
87 | 93 | $this->assertContains($actionInput, $output);
|
| 94 | + $this->assertContains($beforeActionInput, $output); |
88 | 95 | }
|
89 | 96 | }
|
0 commit comments