File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
app/code/Magento/Sales/Model/AdminOrder
dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2011,6 +2011,10 @@ public function createOrder()
20112011 $ order ->save ();
20122012 }
20132013
2014+ if ($ this ->getSendConfirmation () && !$ order ->getEmailSent ()) {
2015+ $ this ->emailSender ->send ($ order );
2016+ }
2017+
20142018 $ this ->_eventManager ->dispatch ('checkout_submit_all_after ' , ['order ' => $ order , 'quote ' => $ quote ]);
20152019
20162020 return $ order ;
Original file line number Diff line number Diff line change @@ -644,6 +644,13 @@ public function testCreateOrderExistingCustomer()
644644
645645 $ this ->model ->getQuote ()->setCustomer ($ customerMock );
646646 $ order = $ this ->model ->createOrder ();
647+ if ($ this ->model ->getSendConfirmation () && !$ order ->getEmailSent ()) {
648+ $ this ->emailSenderMock ->expects ($ this ->once ())
649+ ->method ('send ' )
650+ ->willReturn (true );
651+ } else {
652+ $ this ->emailSenderMock ->expects ($ this ->never ())->method ('send ' );
653+ }
647654 $ this ->verifyCreatedOrder ($ order , $ shippingMethod );
648655 }
649656
You can’t perform that action at this time.
0 commit comments