-
Notifications
You must be signed in to change notification settings - Fork 90
Cover \Magento\AdobeStockImageAdminUi\Ui\Component\Listing\Filter\Color with a unit test #549
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
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.
Hi @Nazar65 thanks for the pull requests, please see review comments
['name' => 'name_one', 'config/colorFormat' => 'format_one'] | ||
); | ||
|
||
$reflection = new \ReflectionClass($this->color); |
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 pass filterData by mocking Context->getFiltersParams
method instead of modifying the test class with reflection.
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.
Ok
*/ | ||
public function testPrepare() | ||
{ | ||
$componentInterface = $this->createMock(\Magento\Framework\View\Element\UiComponentInterface::class); |
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 reorganize the test to make it easier to read: use data provider and extract a couple of private methods.
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.
Ok
Hi @sivaschenko done ✔️ |
Hi @Nazar65, thank you for your contribution! |
Description (*)
Cover \Magento\AdobeStockImageAdminUi\Ui\Component\Listing\Filter\Color with a unit test
Fixed Issues (if relevant)
Manual testing scenarios (*)
Run unit tests