示例#1
0
 public function testShouldRenderQuantity()
 {
     $productMock = $this->getMock('Magento\\Catalog\\Model\\Product', [], [], '', false);
     $this->registryMock->expects($this->any())->method('registry')->with('product')->will($this->returnValue($productMock));
     $productMock->expects($this->once())->method('getTypeId')->will($this->returnValue('id'));
     $this->productTypeConfig->expects($this->once())->method('isProductSet')->with('id')->will($this->returnValue(true));
     $this->assertEquals(false, $this->view->shouldRenderQuantity());
 }
 /**
  * {@inheritdoc}
  */
 public function shouldRenderQuantity()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'shouldRenderQuantity');
     if (!$pluginInfo) {
         return parent::shouldRenderQuantity();
     } else {
         return $this->___callPlugins('shouldRenderQuantity', func_get_args(), $pluginInfo);
     }
 }