Exemplo n.º 1
0
 protected function setUp()
 {
     $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
     $this->weeeHelper = $this->getMockBuilder('\\Magento\\Weee\\Helper\\Data')->disableOriginalConstructor()->setMethods(['isEnabled', 'typeOfDisplay', 'getWeeeTaxInclTax', 'getRowWeeeTaxInclTax', 'getBaseRowWeeeTaxInclTax', 'getBaseWeeeTaxInclTax'])->getMock();
     $this->priceCurrency = $this->getMockBuilder('\\Magento\\Directory\\Model\\PriceCurrency')->disableOriginalConstructor()->setMethods(['format'])->getMock();
     $this->item = $this->getMockBuilder('\\Magento\\Quote\\Model\\Quote\\Item')->disableOriginalConstructor()->setMethods(['__wakeup', 'getWeeeTaxAppliedAmount', 'getPriceInclTax', 'getRowTotalInclTax', 'getCalculationPrice', 'getRowTotal', 'getWeeeTaxAppliedRowAmount', 'getStoreId', 'getBaseRowTotalInclTax', 'getBaseRowTotal', 'getBaseWeeeTaxAppliedRowAmnt', 'getBasePrice', 'getBaseWeeeTaxAppliedAmount', 'getBaseWeeeTaxInclTax', 'getBasePriceInclTax', 'getQtyOrdered'])->getMock();
     $this->item->expects($this->any())->method('getStoreId')->will($this->returnValue(self::STORE_ID));
     $this->renderer = $objectManager->getObject('Magento\\Weee\\Block\\Item\\Price\\Renderer', ['weeeHelper' => $this->weeeHelper, 'priceCurrency' => $this->priceCurrency]);
     $this->renderer->setItem($this->item);
     $this->renderer->setZone(self::ZONE);
 }