Skip to content

Commit 624ddee

Browse files
Merge branch 'develop' into FearlessKiwi-MAGETWO-59948
* develop: MAGETWO-62468: There is no Price on product page when product is out of stock
2 parents 9db41a4 + 5bf5e5f commit 624ddee

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

app/code/Magento/Catalog/Model/Product/Pricing/Renderer/SalableResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ class SalableResolver implements SalableResolverInterface
1919
*/
2020
public function isSalable(\Magento\Framework\Pricing\SaleableInterface $salableItem)
2121
{
22-
return $salableItem->getCanShowPrice() !== false && $salableItem->isSalable();
22+
return $salableItem->getCanShowPrice() !== false;
2323
}
2424
}

app/code/Magento/Catalog/Test/Unit/Model/Product/Pricing/Renderer/SalableResolverTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected function setUp()
2222
{
2323
$this->product = $this->getMock(
2424
\Magento\Catalog\Model\Product::class,
25-
['__wakeup', 'getCanShowPrice', 'isSalable'],
25+
['__wakeup', 'getCanShowPrice'],
2626
[],
2727
'',
2828
false
@@ -40,8 +40,6 @@ public function testSalableItem()
4040
->method('getCanShowPrice')
4141
->willReturn(true);
4242

43-
$this->product->expects($this->any())->method('isSalable')->willReturn(true);
44-
4543
$result = $this->object->isSalable($this->product);
4644
$this->assertTrue($result);
4745
}
@@ -50,9 +48,7 @@ public function testNotSalableItem()
5048
{
5149
$this->product->expects($this->any())
5250
->method('getCanShowPrice')
53-
->willReturn(true);
54-
55-
$this->product->expects($this->any())->method('isSalable')->willReturn(false);
51+
->willReturn(false);
5652

5753
$result = $this->object->isSalable($this->product);
5854
$this->assertFalse($result);

0 commit comments

Comments
 (0)