Skip to content

Commit 600e090

Browse files
author
Serhiy Zhovnir
committed
#18698 Adjust PHPUnit test for OrderSender
1 parent be87471 commit 600e090

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Sales/Test/Unit/Model/Order/Email/Sender/OrderSenderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ public function testSend($configValue, $forceSyncMode, $emailSendingResult, $sen
6464

6565
$this->orderMock->expects($this->once())
6666
->method('setSendEmail')
67-
->with(true);
67+
->with($emailSendingResult);
6868

6969
$this->globalConfig->expects($this->once())
7070
->method('getValue')
7171
->with($configPath)
7272
->willReturn($configValue);
7373

7474
if (!$configValue || $forceSyncMode) {
75-
$this->identityContainerMock->expects($this->once())
75+
$this->identityContainerMock->expects($this->exactly(2))
7676
->method('isEnabled')
7777
->willReturn($emailSendingResult);
7878

@@ -118,7 +118,7 @@ public function testSend($configValue, $forceSyncMode, $emailSendingResult, $sen
118118

119119
$this->orderMock->expects($this->once())
120120
->method('setEmailSent')
121-
->with(true);
121+
->with($emailSendingResult);
122122

123123
$this->orderResourceMock->expects($this->once())
124124
->method('saveAttribute')
@@ -210,7 +210,7 @@ public function testSendVirtualOrder($isVirtualOrder, $formatCallCount, $expecte
210210
->with('sales_email/general/async_sending')
211211
->willReturn(false);
212212

213-
$this->identityContainerMock->expects($this->once())
213+
$this->identityContainerMock->expects($this->exactly(2))
214214
->method('isEnabled')
215215
->willReturn(true);
216216

0 commit comments

Comments
 (0)