Esempio n. 1
0
 /**
  * Detects whether product status should be shown
  *
  * @param EventObserver $observer
  * @return $this
  */
 public function displayProductStatusInfo($observer)
 {
     $info = $observer->getEvent()->getStatus();
     $info->setDisplayStatus($this->_catalogInventoryData->isDisplayProductStockStatus());
     return $this;
 }
Esempio n. 2
0
 public function testIsDisplayProductStockStatus()
 {
     $this->scopeConfigMock->expects($this->once())->method('isSetFlag')->with($this->equalTo(Data::XML_PATH_DISPLAY_PRODUCT_STOCK_STATUS), $this->equalTo(\Magento\Store\Model\ScopeInterface::SCOPE_STORE))->will($this->returnValue(true));
     $this->assertTrue($this->data->isDisplayProductStockStatus());
 }