Skip to content

Commit 6e060e8

Browse files
committed
resolve test issues
1 parent daf95b8 commit 6e060e8

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

app/code/Magento/Quote/Model/Quote/Validator/MinimumOrderAmount/ValidationMessage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class ValidationMessage
3737
public function __construct(
3838
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
3939
\Magento\Store\Model\StoreManagerInterface $storeManager,
40-
\Magento\Framework\Locale\CurrencyInterface $currency = null,
41-
\Magento\Framework\Pricing\Helper\Data $priceHelper
40+
\Magento\Framework\Locale\CurrencyInterface $currency,
41+
\Magento\Framework\Pricing\Helper\Data $priceHelper = null
4242
) {
4343
$this->scopeConfig = $scopeConfig;
4444
$this->storeManager = $storeManager;

app/code/Magento/Quote/Test/Unit/Model/Quote/Validator/MinimumOrderAmount/ValidationMessageTest.php

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class ValidationMessageTest extends \PHPUnit\Framework\TestCase
2121

2222
/**
2323
* @var \PHPUnit_Framework_MockObject_MockObject
24-
* @deprecated since 101.0.0
2524
*/
2625
private $storeManagerMock;
2726

@@ -55,29 +54,17 @@ public function testGetMessage()
5554
{
5655
$minimumAmount = 20;
5756
$minimumAmountCurrency = '$20';
58-
$currencyCode = 'currency_code';
57+
$this->scopeConfigMock->expects($this->at(0))->method('getValue')->with('sales/minimum_order/description', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)->willReturn(null);
5958

60-
$this->scopeConfigMock->expects($this->at(0))
61-
->method('getValue')
62-
->with('sales/minimum_order/description', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)
63-
->willReturn(null);
64-
65-
$this->scopeConfigMock->expects($this->at(1))
66-
->method('getValue')
67-
->with('sales/minimum_order/amount', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)
68-
->willReturn($minimumAmount);
59+
$this->scopeConfigMock->expects($this->at(1))->method('getValue')->with('sales/minimum_order/amount', \Magento\Store\Model\ScopeInterface::SCOPE_STORE)->willReturn($minimumAmount);
6960

7061
$this->priceHelperMock->expects($this->once())
7162
->method('currency')
7263
->with($minimumAmount, true, false)
7364
->will($this->returnValue($minimumAmountCurrency));
7465

75-
$this->assertEquals(
76-
__('Minimum order amount is %1', $minimumAmountCurrency),
77-
$this->model->getMessage()
78-
);
66+
$this->assertEquals(__('Minimum order amount is %1', $minimumAmountCurrency), $this->model->getMessage());
7967
}
80-
8168
public function testGetConfigMessage()
8269
{
8370
$configMessage = 'config_message';

0 commit comments

Comments
 (0)