File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
dev/tests/integration/testsuite/Magento/Sales/Model/AdminOrder Expand file tree Collapse file tree 1 file changed +7
-7
lines changed 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
@@ -826,13 +833,6 @@ private function verifyCreatedOrder($order, $shippingMethod)
826833 {
827834 /** Selectively check order data */
828835 $ orderData = $ order ->getData ();
829- if ($ this ->model ->getSendConfirmation () && !$ order ->getEmailSent ()) {
830- $ this ->emailSenderMock ->expects ($ this ->once ())
831- ->method ('send ' )
832- ->willReturn (true );
833- } else {
834- $ this ->emailSenderMock ->expects ($ this ->never ())->method ('send ' );
835- }
836836 self ::assertNotEmpty ($ orderData ['increment_id ' ], 'Order increment ID is empty. ' );
837837 self ::assertEquals ($ this ->model ->getQuote ()->getId (), $ orderData ['quote_id ' ], 'Quote ID is invalid. ' );
838838 self ::assertEquals (
You can’t perform that action at this time.
0 commit comments