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

33307: Eliminated AspectMock usage from GenerationErrorHandlerTest.php #841

Conversation

anzin
Copy link
Contributor

@anzin anzin commented Jul 1, 2021

Description

I've eliminated AspectMock usage from dev/tests/unit/Magento/FunctionalTestFramework/Util/GenerationErrorHandlerTest.php

Fixed Issues (if relevant)

1.Fixes magento/magento2#33307

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 backward incompatible changes for tests or have related Pull Request with fixes to tests

@magento-engcom-team magento-engcom-team added Partner: Atwix partners-contribution Pull Request is created by Magento Partner labels Jul 1, 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 @anzin
Thank you for your PR.
It looks well for me.

@andrewbess
Copy link
Contributor

Hello @jilu1
Could you please check failed tests and describe the problems.
Thank you in advance.

@jilu1
Copy link
Contributor

jilu1 commented Jul 1, 2021

@andrewbess @anzin
You can ignore the Error: Resource not accessible by integration error. It's a known problem only for MFTF public repository.

@jilu1
Copy link
Contributor

jilu1 commented Jul 1, 2021

@magento-engcom-team
Copy link

@jilu1 the pull request successfully imported.

@magento-cicd2 magento-cicd2 merged commit b6555a1 into magento:develop Jul 2, 2021
Comment on lines +25 to +27
$this->createMock(MftfApplicationConfig::class)
->method('getPhase')
->willReturn(MftfApplicationConfig::GENERATION_PHASE);
Copy link
Member

Choose a reason for hiding this comment

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

@anzin can you please explain the approach? How does such mocking work if the created mock object is not used anywhere? Can this code be simply removed?

cc @jilu1 @soumyau

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sivaschenko Thank you, for your suggestion. I had doubts about that. I will just remove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Atwix partners-contribution Pull Request is created by Magento Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MFTF] Eliminate AspectMock from GenerationErrorHandlerTest (Complex!)
6 participants