Skip to content

[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

Conversation

furseyev
Copy link
Contributor

Description

A phpunit test for the \Magento\Search\Model\SynonymAnalyzer class added
Back port to 2.1 of #17801

@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Component: Search Release Line: 2.1 labels Aug 28, 2018
@furseyev furseyev requested a review from rogyar August 28, 2018 11:44
/**
* Class SynonymAnalyzerTest
*/
class SynonymAnalyzerTest extends \PHPUnit\Framework\TestCase
Copy link
Contributor

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

Copy link
Contributor Author

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);
}
}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-2909 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @furseyev. Thank you for your contribution.
We will aim to release these changes as part of 2.1.16.
Please check the release notes for final confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Search Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants