Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFTF-33305: Eliminate AspectMock from ObjectExtensionUtilTest #843

Conversation

bohdan-harniuk
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk commented Jul 4, 2021

Description

Eliminated AspectMock usage in the \tests\unit\Magento\FunctionalTestFramework\Test\Util\ObjectExtensionUtilTest.

Fixed Issues (if relevant)

  1. [MFTF] Eliminate AspectMock from ObjectExtensionUtilTest (Complex!) magento2#33305: [MFTF] Eliminate AspectMock from ObjectExtensionUtilTest (Complex!)

Additional information

As the main idea of this issue to eliminate AspectMock usage in the ObjectExtensionUtilTest class, AspectMock usage eliminated only partially in the MockModuleResolverBuilder. It is a required action because in that class the \Magento\FunctionalTestingFramework\Util\ModuleResolver mocked instance hardcoded to be retrieved by the ObjectManager mocked object on its create method without any argument.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/verification tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)
  • Changes to Framework doesn't have backwards-incompatible changes for tests or have related Pull Request with fixes to tests

@bohdan-harniuk bohdan-harniuk force-pushed the improvement/m2-33305-eliminate-aspect-mock-from-object-extension-util-test branch from 082046c to ef4f9ea Compare July 5, 2021 09:04
@andrewbess andrewbess requested a review from jilu1 July 20, 2021 15:53
*/
public function setUp(): void
protected function setUp(): void
{
TestLoggingUtil::getInstance()->setMockLoggingUtil();
$resolverMock = new MockModuleResolverBuilder();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, @jilu1!

Could I remove this part of the code?

Thank you.

@bohdan-harniuk bohdan-harniuk added Partner: Atwix partners-contribution Pull Request is created by Magento Partner labels Jul 21, 2021
andrewbess
andrewbess previously approved these changes Jul 22, 2021
Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bohdan-harniuk
Thank you for contribution.
Your changes look good for me.

@bohdan-harniuk
Copy link
Contributor Author

Hello, @jilu1

In this task, we don't have any new singletons created. Please, proceed with the code review!

Thanks, Bohdan

Copy link
Contributor

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @bohdan-harniuk
Thank you for your contribution.
The changes look well for me.

@jilu1
Copy link
Contributor

jilu1 commented Aug 3, 2021

@magento-engcom-team
Copy link

@jilu1 the pull request successfully imported.

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 1850a3e into magento:develop Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Partner: Atwix partners-contribution Pull Request is created by Magento Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants