@@ -25,7 +25,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase
25
25
/**
26
26
* @var ObjectManagerInterface
27
27
*/
28
- private $ _objectManager ;
28
+ private $ objectManager ;
29
29
30
30
/**
31
31
* @var Info
@@ -59,7 +59,7 @@ class CheckoutTest extends \PHPUnit_Framework_TestCase
59
59
*/
60
60
protected function setUp ()
61
61
{
62
- $ this ->_objectManager = Bootstrap::getObjectManager ();
62
+ $ this ->objectManager = Bootstrap::getObjectManager ();
63
63
64
64
$ this ->paypalInfo = $ this ->getMockBuilder (Info::class)
65
65
->disableOriginalConstructor ()
@@ -101,19 +101,19 @@ public function testPrepareCustomerQuote()
101
101
$ quote ->setCheckoutMethod (Onepage::METHOD_CUSTOMER ); // to dive into _prepareCustomerQuote() on switch
102
102
$ quote ->getShippingAddress ()->setSameAsBilling (0 );
103
103
$ quote ->setReservedOrderId (null );
104
- $ customer = $ this ->_objectManager ->create (\Magento \Customer \Model \Customer::class)->load (1 );
104
+ $ customer = $ this ->objectManager ->create (\Magento \Customer \Model \Customer::class)->load (1 );
105
105
$ customer ->setDefaultBilling (false )
106
106
->setDefaultShipping (false )
107
107
->save ();
108
108
109
109
/** @var \Magento\Customer\Model\Session $customerSession */
110
- $ customerSession = $ this ->_objectManager ->get (\Magento \Customer \Model \Session::class);
110
+ $ customerSession = $ this ->objectManager ->get (\Magento \Customer \Model \Session::class);
111
111
$ customerSession ->loginById (1 );
112
112
$ checkout = $ this ->_getCheckout ($ quote );
113
113
$ checkout ->place ('token ' );
114
114
115
115
/** @var \Magento\Customer\Api\CustomerRepositoryInterface $customerService */
116
- $ customerService = $ this ->_objectManager ->get (\Magento \Customer \Api \CustomerRepositoryInterface::class);
116
+ $ customerService = $ this ->objectManager ->get (\Magento \Customer \Api \CustomerRepositoryInterface::class);
117
117
$ customer = $ customerService ->getById ($ quote ->getCustomerId ());
118
118
119
119
$ this ->assertEquals (1 , $ quote ->getCustomerId ());
@@ -166,7 +166,7 @@ public function testPlaceGuestQuote()
166
166
*/
167
167
protected function _getCheckout (Quote $ quote )
168
168
{
169
- return $ this ->_objectManager ->create (
169
+ return $ this ->objectManager ->create (
170
170
Checkout::class,
171
171
[
172
172
'params ' => [
@@ -187,7 +187,7 @@ protected function _getCheckout(Quote $quote)
187
187
public function testReturnFromPaypal ()
188
188
{
189
189
$ quote = $ this ->_getFixtureQuote ();
190
- $ this ->checkoutModel = $ this ->_objectManager ->create (
190
+ $ this ->checkoutModel = $ this ->objectManager ->create (
191
191
Checkout::class,
192
192
[
193
193
'params ' => ['quote ' => $ quote , 'config ' => $ this ->paypalConfig ],
@@ -294,7 +294,7 @@ public function testReturnFromPaypalIfCheckout()
294
294
*/
295
295
private function prepareCheckoutModel (Quote $ quote )
296
296
{
297
- $ this ->checkoutModel = $ this ->_objectManager ->create (
297
+ $ this ->checkoutModel = $ this ->objectManager ->create (
298
298
Checkout::class,
299
299
[
300
300
'params ' => ['quote ' => $ quote , 'config ' => $ this ->paypalConfig ],
@@ -365,7 +365,7 @@ protected function _getExportedAddressFixture(array $addressData)
365
365
protected function _getFixtureQuote ()
366
366
{
367
367
/** @var \Magento\Quote\Model\ResourceModel\Quote\Collection $quoteCollection */
368
- $ quoteCollection = $ this ->_objectManager ->create (\Magento \Quote \Model \ResourceModel \Quote \Collection::class);
368
+ $ quoteCollection = $ this ->objectManager ->create (\Magento \Quote \Model \ResourceModel \Quote \Collection::class);
369
369
370
370
return $ quoteCollection ->getLastItem ();
371
371
}
0 commit comments