File tree Expand file tree Collapse file tree 5 files changed +10
-5
lines changed
app/code/Magento/Checkout
Test/Unit/Controller/Cart
dev/tests/integration/testsuite/Magento
Checkout/Controller/Cart/Index
ConfigurableProduct/Controller Expand file tree Collapse file tree 5 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,10 @@ public function execute()
153
153
154
154
return $ this ->goBack ($ url );
155
155
} catch (\Exception $ e ) {
156
- $ this ->messageManager ->addExceptionMessage ($ e , __ ('We can \'t add this item to your shopping cart right now. ' ));
156
+ $ this ->messageManager ->addExceptionMessage (
157
+ $ e ,
158
+ __ ('We can \'t add this item to your shopping cart right now. ' )
159
+ );
157
160
$ this ->_objectManager ->get (\Psr \Log \LoggerInterface::class)->critical ($ e );
158
161
return $ this ->goBack ();
159
162
}
Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ public function execute()
64
64
65
65
try {
66
66
if (!$ quoteItem || $ productId != $ quoteItem ->getProduct ()->getId ()) {
67
- $ this ->messageManager ->addErrorMessage (__ ("The quote item isn't found. Verify the item and try again. " ));
67
+ $ this ->messageManager ->addErrorMessage (
68
+ __ ("The quote item isn't found. Verify the item and try again. " )
69
+ );
68
70
return $ this ->resultFactory ->create (ResultFactory::TYPE_REDIRECT )->setPath ('checkout/cart ' );
69
71
}
70
72
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public function testRedirectWithWrongProductId()
198
198
$ quoteItemMock ->expects ($ this ->once ())->method ('getProduct ' )->willReturn ($ productMock );
199
199
$ productMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ productIdInQuota );
200
200
$ this ->messageManagerMock ->expects ($ this ->once ())
201
- ->method ('addError ' )
201
+ ->method ('addErrorMessage ' )
202
202
->willReturn ('' );
203
203
$ this ->resultRedirectMock ->expects ($ this ->once ())
204
204
->method ('setPath ' )
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function testExecute()
32
32
);
33
33
34
34
$ this ->assertSessionMessages (
35
- $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
35
+ $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
36
36
\Magento \Framework \Message \MessageInterface::TYPE_ERROR
37
37
);
38
38
}
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public function testExecuteForConfigurableLastOption()
91
91
);
92
92
93
93
$ this ->assertSessionMessages (
94
- $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
94
+ $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
95
95
\Magento \Framework \Message \MessageInterface::TYPE_ERROR
96
96
);
97
97
}
You can’t perform that action at this time.
0 commit comments