-
Notifications
You must be signed in to change notification settings - Fork 132
33309: Eliminated AspectMock usage from TestGeneratorTest.php #850
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
33309: Eliminated AspectMock usage from TestGeneratorTest.php #850
Conversation
There was a problem hiding this 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.
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework |
@jilu1 the pull request successfully imported. |
@anzin |
0721011
to
6ab27e6
Compare
6ab27e6
to
43f9436
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magento import pull request to https://github.com/magento-commerce/magento2-functional-testing-framework |
@jilu1 the pull request successfully imported. |
* @return void | ||
* @throws TestFrameworkException | ||
*/ | ||
public function create(string $filename, string $exportDirectory, string $testPhp): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of pulling some code out of TestGenerator, but I don't think that creating a singleton that hold no data for a single utility function makes sense.
I would sooner that they change the visibility of createCestFile
to public and mock that method instead. This is a lot of code to introduce to mock a single method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KevinBKozan, as for me, in general, the composition is much better than big classes with a variety of functions.
@jilu1, what do you think about that concrete case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc. @andrewbess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bohdan-harniuk Yeah, I see your point in that. I'm just vigilant about creating any classes that will perpetually live in memory, but I suppose that's not much of a concern if there's not a large amount of data being held.
I'm happy to defer to @jilu1 's original review in this case, I'll approve this and we can merge it.
Description
I've eliminated AspectMock usage from
dev/tests/unit/Magento/FunctionalTestFramework/Util/TestGeneratorTest.php
.Fixed Issues (if relevant)
Contribution checklist