Closed vlmed closed 3 years ago
@vlmed was this PR closed intentionally?
@sivaschenko. Yes i closed this PR. When I run only this test, it passes without errors, if I run with all the tests, it does not pass. The reason is in AspectMock::double(DataObjectHandler::class, ['getInstance' => $mockDOHInstance]);
static method. Looks like if we fully remove AspectMock from project my changes in the test should work. I can reopen PR if this changes is correct
Got it, thanks @vlmed . I will add your PR to the issue description and unassign you from the issue
Hello, @jilu1
I have a little bit helped for @vlmed with the aspect mock elimination here. Now all tests run fine.
The problem was that AspectMock mocked the getInstance method of the DataObjectHandler class. In this test, we set mock to the INSTANCE variable through the ReflectionProperty. But we got the wrong mock instance, mocked by the AspectMock (the INSTANCE variable checked in the getInstance method...getInstance method mocked by the AspectMock and that mocked object returned before our mock on the INSTANCE variable).
cc: @vlmed , @sivaschenko
Hello, @jilu1
This task was finished without creating new singletons, so it is not a blocker. You can proceed with the code review.
Thanks, Bohdan
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework
@jilu1 the pull request successfully imported.
Description
This PR will pass all tests after related PR will be merged
Eliminated Aspect Mock usage from ActionMergeUtilTest:
dev/tests/unit/Magento/FunctionalTestFramework/Test/Util/ActionMergeUtilTest.php
Related Pull Requests
https://github.com/magento/magento2-functional-testing-framework/pull/849
Fixed Issues (if relevant)
Contribution checklist