Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AdapterAbstractTest.php
Go to the documentation of this file.
1 <?php
7 
8 class AdapterAbstractTest extends \PHPUnit\Framework\TestCase
9 {
13  protected $_model = null;
14 
15  protected function setUp()
16  {
17  $this->_model = $this->getMockBuilder(\Magento\Framework\Translate\AbstractAdapter::class)
18  ->getMockForAbstractClass();
19  }
20 
24  public function testIsTranslated()
25  {
26  $this->assertFalse($this->_model->isTranslated('string'));
27  }
28 
32  public function testSetLocale()
33  {
34  $this->assertInstanceOf(
35  \Magento\Framework\Translate\AbstractAdapter::class,
36  $this->_model->setLocale('en_US')
37  );
38  }
39 
43  public function testToString()
44  {
45  $this->assertEquals(\Magento\Framework\Translate\Adapter::class, $this->_model->toString());
46  }
47 }