-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[Backport] [Search] Unit test for SynonymAnalyzer model. 2.1 back port. #17839
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
[Backport] [Search] Unit test for SynonymAnalyzer model. 2.1 back port. #17839
Conversation
/** | ||
* Class SynonymAnalyzerTest | ||
*/ | ||
class SynonymAnalyzerTest extends \PHPUnit\Framework\TestCase |
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.
Not sure this namespace exists within a scope of 2.1. Try to use \PHPUnit_Framework_TestCase
instead
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.
Fixed and checked on 2.1 version.
$actual = $this->synonymAnalyzer->getSynonymsForPhrase($phrase); | ||
$this->assertEquals($expected, $actual); | ||
} | ||
} |
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, add an extra empty line after the class closing bracket.
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
Hi @rogyar, thank you for the review. |
Hi @furseyev. Thank you for your contribution. |
Description
A phpunit test for the \Magento\Search\Model\SynonymAnalyzer class added
Back port to 2.1 of #17801