9 use \Magento\Payment\Model\Checks\ZeroTotal;
21 $paymentMethod = $this->getMockBuilder(\
Magento\
Payment\Model\MethodInterface::class)
22 ->disableOriginalConstructor()
27 $paymentMethod->expects($this->once())
29 ->will($this->returnValue(
$code));
33 ->disableOriginalConstructor()
34 ->setMethods([
'getBaseGrandTotal',
'__wakeup'])
37 $quote->expects($this->once())
38 ->method(
'getBaseGrandTotal')
39 ->will($this->returnValue($total));
42 $this->assertEquals($expectation,
$model->isApplicable($paymentMethod,
$quote));
50 return [[
'not_free', 0,
false], [
'free', 1,
true]];
testIsApplicable($code, $total, $expectation)
paymentMethodDataProvider()