17 $this->objectManagerHelper =
new ObjectManagerHelper($this);
22 $checkoutSession = $this->getMockBuilder(
23 \
Magento\Checkout\Model\Session::class
24 )->disableOriginalConstructor()->getMock();
30 $checkoutSession = $this->getMockBuilder(
31 \
Magento\Checkout\Model\Session::class
32 )->disableOriginalConstructor()->getMock();
34 $checkoutSession->expects(
39 'getLastSuccessQuoteId' 44 $checkoutSession->expects($this->at(1))->method(
'__call')->with(
'getLastQuoteId')->will($this->returnValue(0));
51 $checkoutSession = $this->getMockBuilder(
52 \
Magento\Checkout\Model\Session::class
53 )->disableOriginalConstructor()->getMock();
54 $checkoutSession->expects(
59 'getLastSuccessQuoteId' 64 $checkoutSession->expects($this->at(1))->method(
'__call')->with(
'getLastQuoteId')->will($this->returnValue(1));
66 $checkoutSession->expects($this->at(2))->method(
'__call')->with(
'getLastOrderId')->will($this->returnValue(0));
73 $checkoutSession = $this->getMockBuilder(
74 \
Magento\Checkout\Model\Session::class
75 )->disableOriginalConstructor()->getMock();
76 $checkoutSession->expects(
81 'getLastSuccessQuoteId' 86 $checkoutSession->expects($this->at(1))->method(
'__call')->with(
'getLastQuoteId')->will($this->returnValue(1));
88 $checkoutSession->expects($this->at(2))->method(
'__call')->with(
'getLastOrderId')->will($this->returnValue(1));
99 return $this->objectManagerHelper->getObject(
101 [
'checkoutSession' => $checkoutSession]
createSuccessValidator(\PHPUnit_Framework_MockObject_MockObject $checkoutSession)
testIsValidWithEmptyQuoteAndOrder()
testIsValidWithNotEmptyGetLastSuccessQuoteId()