Closed sivaschenko closed 3 years ago
@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 https://github.com/magento/magento2/issues/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):