9 use \Magento\Payment\Model\Checks\TotalMinMax;
30 $paymentMethod = $this->getMockBuilder(
32 )->disableOriginalConstructor()->setMethods([])->getMock();
33 $paymentMethod->expects($this->at(0))->method(
'getConfigData')->with(
35 )->will($this->returnValue(self::PAYMENT_MIN_TOTAL));
36 $paymentMethod->expects($this->at(1))->method(
'getConfigData')->with(
38 )->will($this->returnValue(self::PAYMENT_MAX_TOTAL));
40 $quote = $this->getMockBuilder(\
Magento\
Quote\Model\Quote::class)->disableOriginalConstructor()->setMethods(
41 [
'getBaseGrandTotal',
'__wakeup']
43 $quote->expects($this->once())->method(
'getBaseGrandTotal')->will($this->returnValue($baseGrandTotal));
46 $this->assertEquals($expectation,
$model->isApplicable($paymentMethod,
$quote));
54 return [[1,
false], [6,
false], [3,
true]];
testIsApplicable($baseGrandTotal, $expectation)
paymentMethodDataProvider()