예제 #1
0
 protected function setUp()
 {
     $this->booleanFactoryMock = $this->getMock('\\Magento\\Eav\\Model\\Entity\\Attribute\\Source\\BooleanFactory', [], [], '', false);
     $this->localeDateMock = $this->getMock('\\Magento\\Framework\\Stdlib\\DateTime\\TimezoneInterface');
     $this->attributeMock = $this->getMock('\\Magento\\Eav\\Model\\Entity\\Attribute\\AbstractAttribute', [], [], '', false);
     $this->attributeMock->expects($this->any())->method('getAttributeCode')->will($this->returnValue('datetime'));
     $this->model = new Datetime($this->booleanFactoryMock, $this->localeDateMock);
     $this->model->setAttribute($this->attributeMock);
 }