Skip to content

33582: Eliminated AspectMock from MagentoTestCase.php #863

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

Conversation

anzin
Copy link
Contributor

@anzin anzin commented Jul 26, 2021

Description

I've eliminated AspectMock from \tests\unit\Util\MagentoTestCase.

This PR needs to be merged after all PRs with the eliminated AspectMock, will be merged.

Related Pull Requests
#852
#857
#843
#837
#848
#846
#845
#859
#856
#855
#842
#839
#853
#840
#844
#850

Fixed Issues (if relevant)

  1. Fixes [MFTF] Eliminate AspectMock from MagentoTestCase (Complex!) magento2#33582

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 26, 2021
andrewbess
andrewbess previously approved these changes Jul 26, 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 contribution.
It looks well for me.

@andrewbess andrewbess self-assigned this Jul 26, 2021
@KevinBKozan KevinBKozan self-requested a review July 26, 2021 19:53
@bohdan-harniuk bohdan-harniuk self-requested a review July 27, 2021 07:32
@bohdan-harniuk bohdan-harniuk self-assigned this Jul 27, 2021
…ock-from-magento-test-case

# Conflicts:
#	dev/tests/unit/Util/MagentoTestCase.php
bohdan-harniuk
bohdan-harniuk previously approved these changes Jul 29, 2021
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk 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 contribution!

@jilu1, please, proceed with the code review!

Thanks, Bohdan

Copy link
Member

@okolesnyk okolesnyk left a comment

Choose a reason for hiding this comment

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

Looks good except file_exist change
Could you please revert to how it was

public static function setUpBeforeClass(): void
{
if (!self::fileExists(DOCS_OUTPUT_DIR)) {
if (!file_exists(DOCS_OUTPUT_DIR)) {
Copy link
Member

@okolesnyk okolesnyk Jul 30, 2021

Choose a reason for hiding this comment

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

Please revert this change
\PHPUnit\Framework\Assert::fileExists will exist in version which support PHP 8

@okolesnyk okolesnyk self-assigned this Jul 30, 2021
@okolesnyk
Copy link
Member

@anzin please take a look at my comment

anzin added 2 commits August 3, 2021 20:08
…ing-framework into improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case

# Conflicts:
#	dev/tests/unit/Util/MagentoTestCase.php
…-aspect-mock-from-magento-test-case' into improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case
@anzin anzin dismissed stale reviews from bohdan-harniuk and andrewbess via 5da4b93 August 3, 2021 17:09
@anzin
Copy link
Contributor Author

anzin commented Aug 3, 2021

Hello @okolesnyk, I've reverted the method fileExists(), please check if everything is well.

Thanks

okolesnyk
okolesnyk previously approved these changes Aug 10, 2021
@okolesnyk
Copy link
Member

@magento-engcom-team
Copy link

@okolesnyk the pull request successfully imported.

Copy link
Contributor

@jilu1 jilu1 left a comment

Choose a reason for hiding this comment

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

@anzin Please bring the branch up to date and fix unit test failures.

…ing-framework into improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case
bohdan-harniuk
bohdan-harniuk previously approved these changes Aug 11, 2021
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk 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 contribution!

Hello, @jilu1!

The branch is actualised.
Please proceed with the code review.

This PR should be merged last.

Thanks, Bohdan

@bohdan-harniuk
Copy link
Contributor

@jilu1, all failed tests will be passed right after #861 and #865 would be merged.

Here is the result in the local env (two branches mentioned before were merged):

Screenshot 2021-08-11 at 18 14 50

So, let’s here wait for those PRs to be merged.

Thanks, Bohdan

@jilu1
Copy link
Contributor

jilu1 commented Aug 11, 2021

@bohdan-harniuk
All relevant PRs are merged. Please sync with develop and remove AspectMock from composer.json and update composer.lock.

Great Job on your team!

@bohdan-harniuk
Copy link
Contributor

Thank you, @jilu1!

I'll proceed with the requested changes!

Thanks, Bohdan

…ing-framework into improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case
@bohdan-harniuk bohdan-harniuk dismissed stale reviews from okolesnyk and themself via 4932fe6 August 11, 2021 21:07
@bohdan-harniuk bohdan-harniuk force-pushed the improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case branch from 4932fe6 to 71596ba Compare August 11, 2021 21:10
bohdan-harniuk
bohdan-harniuk previously approved these changes Aug 11, 2021
Copy link
Contributor

@bohdan-harniuk bohdan-harniuk left a comment

Choose a reason for hiding this comment

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

@jilu1, I have removed AspectMock as a package from the composer.

But before doing this I fixed few files that still used AspectMock and removed its configuration from the _bootstrap.php file.

Please, proceed with the code review.

Thanks,
Bohdan

@bohdan-harniuk bohdan-harniuk force-pushed the improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case branch from 9b2f9a3 to 4d71876 Compare August 11, 2021 21:22
@bohdan-harniuk bohdan-harniuk force-pushed the improvement/mftf-33582-eliminate-aspect-mock-from-magento-test-case branch from 4d71876 to 6fa4ad0 Compare August 11, 2021 22:11
@magento-devops-reposync-svc magento-devops-reposync-svc merged commit cc0fc8b into magento:develop Aug 12, 2021
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 MagentoTestCase (Complex!)
9 participants