Skip to content

Commit 135fdf9

Browse files
committed
Eliminated Aspect Mock usage from ActionMergeUtilTest
1 parent 5a6bdf5 commit 135fdf9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionMergeUtilTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace tests\unit\Magento\FunctionalTestFramework\Test\Util;
77

8-
use AspectMock\Test as AspectMock;
98
use Magento\FunctionalTestingFramework\DataGenerator\Handlers\DataObjectHandler;
109
use Magento\FunctionalTestingFramework\DataGenerator\Objects\EntityDataObject;
1110
use Magento\FunctionalTestingFramework\Exceptions\TestReferenceException;
@@ -110,8 +109,13 @@ public function testResolveActionStepEntityData()
110109
$mockDataObject = new EntityDataObject($dataObjectName, $dataObjectType, $mockData, null, null, null);
111110

112111
// Set up mock DataObject Handler
113-
$mockDOHInstance = AspectMock::double(DataObjectHandler::class, ['getObject' => $mockDataObject])->make();
114-
AspectMock::double(DataObjectHandler::class, ['getInstance' => $mockDOHInstance]);
112+
$mockDOHInstance = $this->createMock(DataObjectHandler::class);
113+
$mockDOHInstance->expects($this->any())
114+
->method('getObject')
115+
->willReturn($mockDataObject);
116+
$property = new \ReflectionProperty(DataObjectHandler::class, 'INSTANCE');
117+
$property->setAccessible(true);
118+
$property->setValue($mockDOHInstance);
115119

116120
// Create test object and action object
117121
$actionAttributes = [$userInputKey => $userInputValue];

0 commit comments

Comments
 (0)