Example #1
0
 public function testGetFormats()
 {
     $this->_storeMock->expects($this->once())->method('getId');
     $this->_scopeConfigMock->expects($this->any())->method('getValue')->will($this->returnValue('someValue'));
     $rendererMock = $this->getMock('Magento\\Framework\\Object');
     $this->_addressHelperMock->expects($this->any())->method('getRenderer')->will($this->returnValue($rendererMock));
     $firstExpected = new \Magento\Framework\Object();
     $firstExpected->setCode('format_one')->setTitle('format_one_title')->setDefaultFormat('someValue')->setEscapeHtml(false)->setRenderer(null);
     $secondExpected = new \Magento\Framework\Object();
     $secondExpected->setCode('format_two')->setTitle('format_two_title')->setDefaultFormat('someValue')->setEscapeHtml(true)->setRenderer(null);
     $expectedResult = [$firstExpected, $secondExpected];
     $this->assertEquals($expectedResult, $this->_model->getFormats());
 }