-
Notifications
You must be signed in to change notification settings - Fork 133
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
Eliminated Aspect Mock usage from FilesystemTest #833
Eliminated Aspect Mock usage from FilesystemTest #833
Conversation
@jilu1 I have created this pull request to use as an example of changes for the following tickets. Please review and suggest any best practices that should be applied or mentioned. I think it's important for us to have stable Unit tests for the refactoring tasks, are there any expectations on when it can be stabilized? |
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework |
@jilu1 the pull request successfully imported. |
Goal
codeception/aspect-mock
library is still not compatible with PHP 8.0 at the time of the creation of this ticket.To speed up Magento compatibility with new PHP versions we'd like to eliminate
codeception/aspect-mock
dependency from MFTF. This will make MFTF compatible with PHP 8.0 that is required for declaring the Magento core PHP 8 compatible as well.In order to do this existing unit tests using AspectMock should be refactored to use PHPUnit instead.
Task
Resolves magento/magento2#33291
Replace AspectMock with PHPUnit for
dev/tests/unit/Magento/FunctionalTestFramework/Config/Reader/FilesystemTest.php
in https://github.com/magento/magento2-functional-testing-framework repository.Example
Mocking an object using AspectMock (current):
Mocking an object using PHPUnit (refactored code):