14 abstract class ExpressTest extends \PHPUnit\Framework\TestCase
62 $this->markTestIncomplete();
63 $this->messageManager = $this->getMockForAbstractClass(\
Magento\Framework\Message\ManagerInterface::class);
64 $this->config = $this->createMock(\
Magento\Paypal\Model\Config::class);
65 $this->request = $this->createMock(\
Magento\Framework\
App\Request\Http::class);
66 $this->quote = $this->createMock(\
Magento\Quote\Model\Quote::class);
67 $this->quote->expects($this->any())
69 ->will($this->returnValue(
true));
70 $this->redirect = $this->getMockForAbstractClass(\
Magento\Framework\
App\
Response\RedirectInterface::class);
72 $this->customerData = $this->createMock(\
Magento\Customer\Api\Data\CustomerInterface::class);
73 $this->checkout = $this->createMock(\
Magento\Paypal\Model\Express\Checkout::class);
74 $this->customerSession = $this->createMock(\
Magento\Customer\Model\Session::class);
75 $this->customerSession->expects($this->any())
76 ->method(
'getCustomerDataObject')
77 ->will($this->returnValue($this->customerData));
78 $this->checkoutSession = $this->createMock(\
Magento\Checkout\Model\Session::class);
79 $this->checkoutFactory = $this->createMock(\
Magento\Paypal\Model\Express\Checkout\Factory::class);
80 $this->checkoutFactory->expects($this->any())
82 ->will($this->returnValue($this->checkout));
83 $this->checkoutSession->expects($this->any())
85 ->will($this->returnValue($this->quote));
86 $this->session = $this->createMock(\
Magento\Framework\Session\Generic::class);
88 $this->objectManagerCallback =
function (
$className) {
96 ->will($this->returnCallback(
function (
$className) {
101 ->will($this->returnCallback(
function (
$className) {
105 $helper =
new ObjectManagerHelper($this);
106 $this->model =
$helper->getObject(
107 '\\Magento\\Paypal\\Controller\\Express\\' . $this->
name,
109 'messageManager' => $this->messageManager,
110 'response' => $this->response,
111 'redirect' => $this->redirect,
112 'request' => $this->request,
113 'customerSession' => $this->customerSession,
114 'checkoutSession' => $this->checkoutSession,
115 'checkoutFactory' => $this->checkoutFactory,
116 'paypalSession' => $this->session,
call_user_func($callable, $param)