36 $this->model = $this->getMockBuilder(\
Magento\Sales\Block\Adminhtml\Order\
Create\AbstractCreate::class)
37 ->setMethods([
'convertPrice'])
38 ->disableOriginalConstructor()
39 ->getMockForAbstractClass();
40 $this->priceInfoMock = $this->getMockBuilder(\
Magento\Framework\Pricing\PriceInfo\Base::class)
41 ->disableOriginalConstructor()
43 $this->productMock = $this->getMockBuilder(\
Magento\Catalog\Model\Product::class)
44 ->disableOriginalConstructor()
46 $this->linkPriceMock = $this->getMockBuilder(\
Magento\Downloadable\Pricing\
Price\LinkPrice::class)
47 ->disableOriginalConstructor()
49 $this->productMock->expects($this->any())
50 ->method(
'getPriceInfo')
51 ->willReturn($this->priceInfoMock);
59 $this->linkPriceMock->expects($this->once())
62 $this->priceInfoMock->expects($this->once())
65 ->willReturn($this->linkPriceMock);
66 $this->model->expects($this->once())
67 ->method(
'convertPrice')
69 ->willReturn($resultPrice);
70 $this->assertEquals($resultPrice, $this->model->getItemPrice($this->productMock));
82 self::assertInstanceOf(Product::class,
$product);
94 $itemMock = $this->createMock(\
Magento\Wishlist\Model\Item::class);
95 $itemMock->expects($this->once())->method(
'getProduct')->willReturn(
$productMock);