Skip to content

[Backport] [Search] Unit test for SynonymAnalyzer model. 2.1 back port.#17839

Merged
magento-engcom-team merged 2 commits into
magento:2.1-developfrom
furseyev:SynonymAnalyzer-phpunit-2.1-port
Sep 3, 2018
Merged

[Backport] [Search] Unit test for SynonymAnalyzer model. 2.1 back port.#17839
magento-engcom-team merged 2 commits into
magento:2.1-developfrom
furseyev:SynonymAnalyzer-phpunit-2.1-port

Conversation

@furseyev
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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);
}
} No newline at end of file
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@magento-engcom-team
Copy link
Copy Markdown
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