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()
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
@@ -826,13 +833,6 @@ private function verifyCreatedOrder($order, $shippingMethod)
826
833
{
827
834
/** Selectively check order data */
828
835
$ 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
- }
836
836
self ::assertNotEmpty ($ orderData ['increment_id ' ], 'Order increment ID is empty. ' );
837
837
self ::assertEquals ($ this ->model ->getQuote ()->getId (), $ orderData ['quote_id ' ], 'Quote ID is invalid. ' );
838
838
self ::assertEquals (
You can’t perform that action at this time.
0 commit comments