@@ -137,6 +137,7 @@ protected function setUp(): void
137137 $ this ->storeMock ->expects ($ this ->any ())
138138 ->method ('getStoreId ' )
139139 ->willReturn (1 );
140+
140141 $ this ->orderMock ->expects ($ this ->any ())
141142 ->method ('getStore ' )
142143 ->willReturn ($ this ->storeMock );
@@ -152,7 +153,7 @@ protected function setUp(): void
152153
153154 $ this ->invoiceMock = $ this ->getMockBuilder (\Magento \Sales \Model \Order \Invoice::class)
154155 ->disableOriginalConstructor ()
155- ->setMethods (['setSendEmail ' , 'setEmailSent ' ])
156+ ->setMethods (['setSendEmail ' , 'setEmailSent ' , ' getId ' ])
156157 ->getMock ();
157158
158159 $ this ->commentMock = $ this ->getMockBuilder (InvoiceCommentCreationInterface::class)
@@ -170,6 +171,7 @@ protected function setUp(): void
170171 $ this ->orderMock ->expects ($ this ->any ())
171172 ->method ('getBillingAddress ' )
172173 ->willReturn ($ this ->addressMock );
174+
173175 $ this ->orderMock ->expects ($ this ->any ())
174176 ->method ('getShippingAddress ' )
175177 ->willReturn ($ this ->addressMock );
@@ -280,7 +282,9 @@ public function testSend($configValue, $forceSyncMode, $isComment, $emailSending
280282 if (!$ configValue || $ forceSyncMode ) {
281283 $ transport = [
282284 'order ' => $ this ->orderMock ,
285+ 'order_id ' => 1 ,
283286 'invoice ' => $ this ->invoiceMock ,
287+ 'invoice_id ' => 1 ,
284288 'comment ' => $ isComment ? 'Comment text ' : '' ,
285289 'billing ' => $ this ->addressMock ,
286290 'payment_html ' => 'Payment Info Block ' ,
@@ -315,6 +319,14 @@ public function testSend($configValue, $forceSyncMode, $isComment, $emailSending
315319 ->method ('isEnabled ' )
316320 ->willReturn ($ emailSendingResult );
317321
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+
318330 if ($ emailSendingResult ) {
319331 $ this ->identityContainerMock ->expects ($ this ->once ())
320332 ->method ('getCopyMethod ' )
0 commit comments