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)); }