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()
2011
2011
$ order ->save ();
2012
2012
}
2013
2013
2014
+ if ($ this ->getSendConfirmation () && !$ order ->getEmailSent ()) {
2015
+ $ this ->emailSender ->send ($ order );
2016
+ }
2017
+
2014
2018
$ this ->_eventManager ->dispatch ('checkout_submit_all_after ' , ['order ' => $ order , 'quote ' => $ quote ]);
2015
2019
2016
2020
return $ order ;
Original file line number Diff line number Diff line change @@ -644,6 +644,13 @@ public function testCreateOrderExistingCustomer()
644
644
645
645
$ this ->model ->getQuote ()->setCustomer ($ customerMock );
646
646
$ 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
+ }
647
654
$ this ->verifyCreatedOrder ($ order , $ shippingMethod );
648
655
}
649
656
You can’t perform that action at this time.
0 commit comments