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()
153153
154154 return $ this ->goBack ($ url );
155155 } 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+ );
157160 $ this ->_objectManager ->get (\Psr \Log \LoggerInterface::class)->critical ($ e );
158161 return $ this ->goBack ();
159162 }
Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ public function execute()
6464
6565 try {
6666 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+ );
6870 return $ this ->resultFactory ->create (ResultFactory::TYPE_REDIRECT )->setPath ('checkout/cart ' );
6971 }
7072
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ public function testRedirectWithWrongProductId()
198198 $ quoteItemMock ->expects ($ this ->once ())->method ('getProduct ' )->willReturn ($ productMock );
199199 $ productMock ->expects ($ this ->once ())->method ('getId ' )->willReturn ($ productIdInQuota );
200200 $ this ->messageManagerMock ->expects ($ this ->once ())
201- ->method ('addError ' )
201+ ->method ('addErrorMessage ' )
202202 ->willReturn ('' );
203203 $ this ->resultRedirectMock ->expects ($ this ->once ())
204204 ->method ('setPath ' )
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function testExecute()
3232 );
3333
3434 $ this ->assertSessionMessages (
35- $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
35+ $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
3636 \Magento \Framework \Message \MessageInterface::TYPE_ERROR
3737 );
3838 }
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public function testExecuteForConfigurableLastOption()
9191 );
9292
9393 $ this ->assertSessionMessages (
94- $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
94+ $ this ->equalTo (['The coupon code " test" is not valid. ' ]),
9595 \Magento \Framework \Message \MessageInterface::TYPE_ERROR
9696 );
9797 }
You can’t perform that action at this time.
0 commit comments