public function testGetAmount() { $amount = 20.0; $priceMock = $this->getMockBuilder('Magento\\Framework\\Pricing\\Price\\PriceInterface')->getMockForAbstractClass(); $this->priceInfoMock->expects($this->once())->method('getPrices')->willReturn([$priceMock]); $this->calculatorMock->expects($this->once())->method('getAmount')->with(false, $this->saleableItemMock)->willReturn($amount); $this->assertEquals($amount, $this->basePrice->getAmount()); }