Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SynonymGroupTest.php
Go to the documentation of this file.
1 <?php
7 
8 class SynonymGroupTest extends \PHPUnit\Framework\TestCase
9 {
13  private $model;
14 
15  public function setUp()
16  {
17  $this->model = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))
18  ->getObject(\Magento\Search\Model\SynonymGroup::class);
19  }
20 
21  public function testSetGetStoreId()
22  {
23  $this->assertEquals(0, $this->model->getStoreId());
24  $this->assertEquals($this->model, $this->model->setStoreId(1));
25  $this->assertEquals(1, $this->model->getStoreId());
26  }
27 
28  public function testSetGetWebsiteId()
29  {
30  $this->assertEquals(0, $this->model->getWebsiteId());
31  $this->assertEquals($this->model, $this->model->setWebsiteId(1));
32  $this->assertEquals(1, $this->model->getWebsiteId());
33  }
34 
35  public function testSetGetSynonymGroup()
36  {
37  $this->assertEquals($this->model, $this->model->setSynonymGroup('a,b,c'));
38  $this->assertEquals('a,b,c', $this->model->getSynonymGroup());
39  }
40 
41  public function testSetGetGroupId()
42  {
43  $this->assertEquals($this->model, $this->model->setGroupId(1));
44  $this->assertEquals(1, $this->model->getGroupId());
45  }
46 }