Пример #1
0
 /**
  * @covers \Magento\Eav\Model\Attribute\Data\Select::compactValue
  */
 public function testCompactValue()
 {
     $entityMock = $this->getMock('\\Magento\\Framework\\Model\\AbstractModel', [], [], '', false);
     $entityMock->expects($this->once())->method('setData')->with('attrCode', 'value');
     $attributeMock = $this->getMock('\\Magento\\Eav\\Model\\Attribute', [], [], '', false);
     $attributeMock->expects($this->any())->method('getAttributeCode')->will($this->returnValue('attrCode'));
     $this->model->setAttribute($attributeMock);
     $this->model->setEntity($entityMock);
     $this->model->compactValue('value');
 }