@@ -137,6 +137,7 @@ protected function setUp(): void
137
137
$ this ->storeMock ->expects ($ this ->any ())
138
138
->method ('getStoreId ' )
139
139
->willReturn (1 );
140
+
140
141
$ this ->orderMock ->expects ($ this ->any ())
141
142
->method ('getStore ' )
142
143
->willReturn ($ this ->storeMock );
@@ -152,7 +153,7 @@ protected function setUp(): void
152
153
153
154
$ this ->invoiceMock = $ this ->getMockBuilder (\Magento \Sales \Model \Order \Invoice::class)
154
155
->disableOriginalConstructor ()
155
- ->setMethods (['setSendEmail ' , 'setEmailSent ' ])
156
+ ->setMethods (['setSendEmail ' , 'setEmailSent ' , ' getId ' ])
156
157
->getMock ();
157
158
158
159
$ this ->commentMock = $ this ->getMockBuilder (InvoiceCommentCreationInterface::class)
@@ -170,6 +171,7 @@ protected function setUp(): void
170
171
$ this ->orderMock ->expects ($ this ->any ())
171
172
->method ('getBillingAddress ' )
172
173
->willReturn ($ this ->addressMock );
174
+
173
175
$ this ->orderMock ->expects ($ this ->any ())
174
176
->method ('getShippingAddress ' )
175
177
->willReturn ($ this ->addressMock );
@@ -280,7 +282,9 @@ public function testSend($configValue, $forceSyncMode, $isComment, $emailSending
280
282
if (!$ configValue || $ forceSyncMode ) {
281
283
$ transport = [
282
284
'order ' => $ this ->orderMock ,
285
+ 'order_id ' => 1 ,
283
286
'invoice ' => $ this ->invoiceMock ,
287
+ 'invoice_id ' => 1 ,
284
288
'comment ' => $ isComment ? 'Comment text ' : '' ,
285
289
'billing ' => $ this ->addressMock ,
286
290
'payment_html ' => 'Payment Info Block ' ,
@@ -315,6 +319,14 @@ public function testSend($configValue, $forceSyncMode, $isComment, $emailSending
315
319
->method ('isEnabled ' )
316
320
->willReturn ($ emailSendingResult );
317
321
322
+ $ this ->orderMock ->expects ($ this ->once ())
323
+ ->method ('getId ' )
324
+ ->willReturn (1 );
325
+
326
+ $ this ->invoiceMock ->expects ($ this ->once ())
327
+ ->method ('getId ' )
328
+ ->willReturn (1 );
329
+
318
330
if ($ emailSendingResult ) {
319
331
$ this ->identityContainerMock ->expects ($ this ->once ())
320
332
->method ('getCopyMethod ' )
0 commit comments