File tree 1 file changed +7
-4
lines changed
dev/tests/integration/testsuite/Magento/Paypal/_files 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 18
18
1 ,
19
19
\Magento \Store \Model \ScopeInterface::SCOPE_STORE
20
20
);
21
+ $ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
21
22
/** @var $product \Magento\Catalog\Model\Product */
22
- $ product = \ Magento \ TestFramework \ Helper \Bootstrap:: getObjectManager () ->create ('Magento\Catalog\Model\Product ' );
23
+ $ product = $ objectManager ->create ('Magento\Catalog\Model\Product ' );
23
24
$ product ->setTypeId ('simple ' )
24
25
->setId (1 )
25
26
->setAttributeSetId (4 )
67
68
$ shippingAddress ->setCollectShippingRates (true );
68
69
69
70
/** @var $quote \Magento\Quote\Model\Quote */
70
- $ quote = \ Magento \ TestFramework \ Helper \Bootstrap:: getObjectManager () ->create ('Magento\Quote\Model\Quote ' );
71
+ $ quote = $ objectManager ->create ('Magento\Quote\Model\Quote ' );
71
72
$ quote ->setCustomerIsGuest (
72
73
true
73
74
)->setStoreId (
74
- \ Magento \ TestFramework \ Helper \Bootstrap:: getObjectManager () ->get (
75
+ $ objectManager ->get (
75
76
'Magento\Store\Model\StoreManagerInterface '
76
77
)->getStore ()->getId ()
77
78
)->setReservedOrderId (
87
88
$ quote ->getShippingAddress ()->setShippingMethod ('flatrate_flatrate ' );
88
89
$ quote ->getShippingAddress ()->setCollectShippingRates (true );
89
90
$ quote ->getPayment ()->setMethod (\Magento \Paypal \Model \Config::METHOD_WPS_EXPRESS );
90
- $ quote ->collectTotals ()->save ();
91
91
92
+ $ quoteRepository = $ objectManager ->get (\Magento \Quote \Api \CartRepositoryInterface::class);
93
+ $ quoteRepository ->save ($ quote );
94
+ $ quote = $ quoteRepository ->get ($ quote ->getId ());
92
95
$ quote->
setCustomerEmail (
'[email protected] ' );
93
96
94
97
/** @var $service \Magento\Quote\Api\CartManagementInterface */
You can’t perform that action at this time.
0 commit comments