-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Unit Test for Magento\LayeredNavigation\Observer\Edit\Tab\Front\ProductAttributeFormBuildFrontTabObserver #26617
Conversation
…ctAttributeFormBuildFrontTabObserver
Hi @karyna-tsymbal-atwix. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
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.
Please fix static tests.
…ttributeFormBuildFrontTabObserver
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 @karyna-tsymbal-atwix, could you please fix minor CR recommendations?
Thank you!
->willReturn(true); | ||
|
||
$fieldsetMock = $this->createMock(Fieldset::class); | ||
$fieldsetMock->expects(self::exactly(3))->method('addField'); |
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.
Could you please replace the static method's call for consistency with other stubs definition.
$fieldsetMock->expects(self::exactly(3))->method('addField'); | |
$fieldsetMock->expects($this->exactly(3))->method('addField'); |
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.
@dmytro-ch thanks for the note, fixed!
/** | ||
* Test case when module output is disabled | ||
*/ | ||
public function testExecuteWhenOutputDisabled() |
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.
It's not critical but would be preferred to follow the strict type of definition for methods signature.
public function testExecuteWhenOutputDisabled() | |
public function testExecuteWhenOutputDisabled(): 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.
done
…ttributeFormBuildFrontTabObserver
Hi @dmytro-ch, thank you for the review. |
…b\Front\ProductAttributeFormBuildFrontTabObserver #26617
Hi @karyna-tsymbal-atwix, thank you for your contribution! |
Description (*)
Covers Magento\LayeredNavigation\Observer\Edit\Tab\Front\ProductAttributeFormBuildFrontTabObserver class with a unit test.
Contribution checklist (*)