Closed anzin closed 3 years ago
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework
@jilu1 the pull request successfully imported.
@anzin Thank you for your PR! Please address unit test failure in ModuleResolverTest.
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework
@jilu1 the pull request successfully imported.
Hello @jilu1 , sorry I don't understand your question. I removed these tests because we eliminate AspectMock, and these tests are not necessary, or I misunderstood something?
Thank you.
Hello @jilu1 , sorry I don't understand your question. I removed these tests because we eliminate AspectMock, and these tests are not necessary, or I misunderstood something?
Thank you.
@anzin Can you explain why these tests are not necessary? In other words, should you add these testAggregateTestModulePathsDevTests
, testGetModulePathsLocations
, testGetComposerJsonTestModulePathsForPathInvocation
, testGetComposerInstalledTestModulePathsForPathInvocation
as unit test for new class ModuleResolverService
?
ModuleResolverService
Hello, @jilu1!
Yes, I will try to add them!
Thank you!
Hello @jilu1 , sorry I don't understand your question. I removed these tests because we eliminate AspectMock, and these tests are not necessary, or I misunderstood something? Thank you.
@anzin Can you explain why these tests are not necessary? In other words, should you add these
testAggregateTestModulePathsDevTests
,testGetModulePathsLocations
,testGetComposerJsonTestModulePathsForPathInvocation
,testGetComposerInstalledTestModulePathsForPathInvocation
as unit test for new classModuleResolverService
?
@jilu1, ~could you please help me to understand what does that test do? -> testAggregateTestModulePathsDevTests
... because of the same reason.~
I've found what exactly those tests do! I'll rewrite them without using AspectMock!
Thanks!
Hello, @jilu1, I've added new PR where returned deleted tests and fixed them so that they do not use AspectMock, please check if everything is well.
Thanks.
Hello @jilu1, my idea was to mock these methods because one test is did not passed, but then it turned out that it is not necessary to do so I put everything back.
Thanks.
@anzin
I understand why you moved some methods back. But my above question is actually why you keep wrapper methods like:
private function getComposerInstalledTestModulePaths($composerFile)
{
return ModuleResolverService::getInstance()->getComposerInstalledTestModulePaths($composerFile);
}
private function getCustomModulePaths()
{
return ModuleResolverService::getInstance()->getCustomModulePaths();
}
while you can call ModuleResolverService::getInstance()->getComposerInstalledTestModulePaths($composerFile);
or ModuleResolverService::getInstance()->getCustomModulePaths();
directly. Is it to help with unit test?
@jilu1 , I understood what you mean, I've corrected the code please check if everything is well.
Thanks for your review.
Hello @jilu1 , I've fixed test 'testGetModulePathsLocations', please check if everything is well.
Thanks.
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework
@jilu1 the pull request successfully imported.
Description
I've eliminated AspectMock usage from
dev/tests/unit/Magento/FunctionalTestFramework/Util/ModuleResolverTest.php
Fixed Issues (if relevant)
Contribution checklist