Exemplo n.º 1
0
 public function testGetTotalAmount()
 {
     $totalAmount = 10;
     $itemMock = $this->getMockBuilder('\\Magento\\Sales\\Model\\Order\\Item')->disableOriginalConstructor()->getMock();
     $this->itemPriceRenderer->expects($this->once())->method('getTotalAmount')->with($itemMock)->will($this->returnValue($totalAmount));
     $this->assertEquals($totalAmount, $this->renderer->getTotalAmount($itemMock));
 }
Exemplo n.º 2
0
 /**
  * @param \Magento\Backend\Block\Template\Context $context
  * @param \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $defaultColumnRenderer
  * @param \Magento\Tax\Helper\Data $taxHelper
  * @param ItemPriceRenderer $itemPriceRenderer
  * @param array $data
  */
 public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn $defaultColumnRenderer, \Magento\Tax\Helper\Data $taxHelper, ItemPriceRenderer $itemPriceRenderer, array $data = array())
 {
     parent::__construct($context, $defaultColumnRenderer, $taxHelper, $itemPriceRenderer, $data);
 }