Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
StringTest.php
Go to the documentation of this file.
1 <?php
8 
9 class StringTest extends \PHPUnit\Framework\TestCase
10 {
14  protected $_model;
15 
16  protected function setUp()
17  {
19  \Magento\Translation\Model\StringUtils::class
20  );
21  }
22 
23  public function testConstructor()
24  {
25  $this->assertInstanceOf(
26  \Magento\Translation\Model\ResourceModel\StringUtils::class,
27  $this->_model->getResource()
28  );
29  }
30 
31  public function testSetGetString()
32  {
33  $expectedString = __METHOD__;
34  $this->_model->setString($expectedString);
35  $actualString = $this->_model->getString();
36  $this->assertEquals($expectedString, $actualString);
37  }
38 }