コード例 #1
0
 /**
  * Run test getStoreWebsiteId method
  *
  * @return void
  */
 public function testGetStoreWebsiteId()
 {
     $storeId = 20;
     $storeMock = $this->getMock('Magento\\Store\\Model\\Store', ['getWebsiteId'], [], '', false);
     $this->storeManagerMock->expects($this->once())->method('getStore')->with($storeId)->will($this->returnValue($storeMock));
     $storeMock->expects($this->once())->method('getWebsiteId')->will($this->returnValue('return-value'));
     $this->assertEquals('return-value', $this->attribute->getStoreWebsiteId($storeId));
 }