@@ -138,92 +138,92 @@ public function testStartActionCustomerToQuote()
138
138
);
139
139
}
140
140
141
- /**
142
- * Test return action with configurable product.
143
- *
144
- * Skipped due to MAGETWO-87333
145
- * #@magentoDataFixture Magento/Paypal/_files/quote_express_configurable.php
146
- */
147
- public function testReturnAction ()
148
- {
149
- $ this ->markTestSkipped ('MAGETWO-87333 ' );
150
- $ quote = $ this ->_objectManager ->create (Quote::class);
151
- $ quote ->load ('test_cart_with_configurable ' , 'reserved_order_id ' );
152
-
153
- $ payment = $ quote ->getPayment ();
154
- $ payment ->setMethod (\Magento \Paypal \Model \Config::METHOD_WPP_EXPRESS )
155
- ->setAdditionalInformation (\Magento \Paypal \Model \Express \Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID , 123 );
156
-
157
- $ quote ->save ();
158
-
159
- $ this ->_objectManager ->removeSharedInstance (Session::class);
160
- $ session = $ this ->_objectManager ->get (Session::class);
161
- $ session ->setQuoteId ($ quote ->getId ());
162
-
163
- $ nvpMethods = [
164
- 'setToken ' ,
165
- 'setPayerId ' ,
166
- 'setAmount ' ,
167
- 'setPaymentAction ' ,
168
- 'setNotifyUrl ' ,
169
- 'setInvNum ' ,
170
- 'setCurrencyCode ' ,
171
- 'setPaypalCart ' ,
172
- 'setIsLineItemsEnabled ' ,
173
- 'setAddress ' ,
174
- 'setBillingAddress ' ,
175
- 'callDoExpressCheckoutPayment ' ,
176
- 'callGetExpressCheckoutDetails ' ,
177
- 'getExportedBillingAddress '
178
- ];
179
-
180
- $ nvpMock = $ this ->getMockBuilder (Nvp::class)
181
- ->setMethods ($ nvpMethods )
182
- ->disableOriginalConstructor ()
183
- ->getMock ();
184
-
185
- foreach ($ nvpMethods as $ method ) {
186
- $ nvpMock ->method ($ method )
187
- ->willReturnSelf ();
188
- }
189
-
190
- $ apiFactoryMock = $ this ->getMockBuilder (ApiFactory::class)
191
- ->disableOriginalConstructor ()
192
- ->setMethods (['create ' ])
193
- ->getMock ();
194
-
195
- $ apiFactoryMock ->method ('create ' )
196
- ->with (Nvp::class)
197
- ->willReturn ($ nvpMock );
198
-
199
- $ this ->_objectManager ->addSharedInstance ($ apiFactoryMock , ApiFactory::class);
200
-
201
- $ sessionMock = $ this ->getMockBuilder (GenericSession::class)
202
- ->setMethods (['getExpressCheckoutToken ' ])
203
- ->setConstructorArgs (
204
- [
205
- $ this ->_objectManager ->get (\Magento \Framework \App \Request \Http::class),
206
- $ this ->_objectManager ->get (\Magento \Framework \Session \SidResolverInterface::class),
207
- $ this ->_objectManager ->get (\Magento \Framework \Session \Config \ConfigInterface::class),
208
- $ this ->_objectManager ->get (\Magento \Framework \Session \SaveHandlerInterface::class),
209
- $ this ->_objectManager ->get (\Magento \Framework \Session \ValidatorInterface::class),
210
- $ this ->_objectManager ->get (\Magento \Framework \Session \StorageInterface::class),
211
- $ this ->_objectManager ->get (\Magento \Framework \Stdlib \CookieManagerInterface::class),
212
- $ this ->_objectManager ->get (\Magento \Framework \Stdlib \Cookie \CookieMetadataFactory::class),
213
- $ this ->_objectManager ->get (\Magento \Framework \App \State::class),
214
- ]
215
- )
216
- ->getMock ();
217
-
218
- $ sessionMock ->method ('getExpressCheckoutToken ' )
219
- ->willReturn (true );
220
-
221
- $ this ->_objectManager ->addSharedInstance ($ sessionMock , PaypalSession::class);
222
-
223
- $ this ->dispatch ('paypal/express/returnAction ' );
224
- $ this ->assertRedirect ($ this ->stringContains ('checkout/onepage/success ' ));
225
-
226
- $ this ->_objectManager ->removeSharedInstance (ApiFactory::class);
227
- $ this ->_objectManager ->removeSharedInstance (PaypalSession::class);
228
- }
141
+ // /**
142
+ // * Test return action with configurable product.
143
+ // *
144
+ // * Skipped due to MAGETWO-87333
145
+ // * #@magentoDataFixture Magento/Paypal/_files/quote_express_configurable.php
146
+ // */
147
+ // public function testReturnAction()
148
+ // {
149
+ // $this->markTestSkipped('MAGETWO-87333');
150
+ // $quote = $this->_objectManager->create(Quote::class);
151
+ // $quote->load('test_cart_with_configurable', 'reserved_order_id');
152
+ //
153
+ // $payment = $quote->getPayment();
154
+ // $payment->setMethod(\Magento\Paypal\Model\Config::METHOD_WPP_EXPRESS)
155
+ // ->setAdditionalInformation(\Magento\Paypal\Model\Express\Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID, 123);
156
+ //
157
+ // $quote->save();
158
+ //
159
+ // $this->_objectManager->removeSharedInstance(Session::class);
160
+ // $session = $this->_objectManager->get(Session::class);
161
+ // $session->setQuoteId($quote->getId());
162
+ //
163
+ // $nvpMethods = [
164
+ // 'setToken',
165
+ // 'setPayerId',
166
+ // 'setAmount',
167
+ // 'setPaymentAction',
168
+ // 'setNotifyUrl',
169
+ // 'setInvNum',
170
+ // 'setCurrencyCode',
171
+ // 'setPaypalCart',
172
+ // 'setIsLineItemsEnabled',
173
+ // 'setAddress',
174
+ // 'setBillingAddress',
175
+ // 'callDoExpressCheckoutPayment',
176
+ // 'callGetExpressCheckoutDetails',
177
+ // 'getExportedBillingAddress'
178
+ // ];
179
+ //
180
+ // $nvpMock = $this->getMockBuilder(Nvp::class)
181
+ // ->setMethods($nvpMethods)
182
+ // ->disableOriginalConstructor()
183
+ // ->getMock();
184
+ //
185
+ // foreach ($nvpMethods as $method) {
186
+ // $nvpMock->method($method)
187
+ // ->willReturnSelf();
188
+ // }
189
+ //
190
+ // $apiFactoryMock = $this->getMockBuilder(ApiFactory::class)
191
+ // ->disableOriginalConstructor()
192
+ // ->setMethods(['create'])
193
+ // ->getMock();
194
+ //
195
+ // $apiFactoryMock->method('create')
196
+ // ->with(Nvp::class)
197
+ // ->willReturn($nvpMock);
198
+ //
199
+ // $this->_objectManager->addSharedInstance($apiFactoryMock, ApiFactory::class);
200
+ //
201
+ // $sessionMock = $this->getMockBuilder(GenericSession::class)
202
+ // ->setMethods(['getExpressCheckoutToken'])
203
+ // ->setConstructorArgs(
204
+ // [
205
+ // $this->_objectManager->get(\Magento\Framework\App\Request\Http::class),
206
+ // $this->_objectManager->get(\Magento\Framework\Session\SidResolverInterface::class),
207
+ // $this->_objectManager->get(\Magento\Framework\Session\Config\ConfigInterface::class),
208
+ // $this->_objectManager->get(\Magento\Framework\Session\SaveHandlerInterface::class),
209
+ // $this->_objectManager->get(\Magento\Framework\Session\ValidatorInterface::class),
210
+ // $this->_objectManager->get(\Magento\Framework\Session\StorageInterface::class),
211
+ // $this->_objectManager->get(\Magento\Framework\Stdlib\CookieManagerInterface::class),
212
+ // $this->_objectManager->get(\Magento\Framework\Stdlib\Cookie\CookieMetadataFactory::class),
213
+ // $this->_objectManager->get(\Magento\Framework\App\State::class),
214
+ // ]
215
+ // )
216
+ // ->getMock();
217
+ //
218
+ // $sessionMock->method('getExpressCheckoutToken')
219
+ // ->willReturn(true);
220
+ //
221
+ // $this->_objectManager->addSharedInstance($sessionMock, PaypalSession::class);
222
+ //
223
+ // $this->dispatch('paypal/express/returnAction');
224
+ // $this->assertRedirect($this->stringContains('checkout/onepage/success'));
225
+ //
226
+ // $this->_objectManager->removeSharedInstance(ApiFactory::class);
227
+ // $this->_objectManager->removeSharedInstance(PaypalSession::class);
228
+ // }
229
229
}
0 commit comments