Skip to content

Commit

Permalink
fixup! fix(outbox): add status for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Apr 4, 2024
1 parent 2f64107 commit fb74554
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/Unit/Send/SendHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,13 @@ public function testProcessError(): void {
$mailAccount->setSentMailboxId(1);
$mailAccount->setUserId('bob');
$account = new Account($mailAccount);
$localMessage = new LocalMessage();
$localMessage->setId(100);
$localMessage->setStatus(LocalMessage::STATUS_RAW);
$localMessage = $this->getMockBuilder(LocalMessage::class);
$localMessage->addMethods(['getStatus']);
$mock = $localMessage->getMock();
$mock->expects(self::exactly(4))
$mock->setStatus(10);
$mock->expects(self::any())
->method('getStatus')
->willReturnOnConsecutiveCalls([
LocalMessage::STATUS_RAW,
LocalMessage::STATUS_RAW,
LocalMessage::STATUS_SMPT_SEND_FAIL,
]);

->willReturn(LocalMessage::STATUS_SMPT_SEND_FAIL);
$this->transmission->expects(self::once())
->method('sendMessage');
$this->copySentMessageHandler->expects(self::never())
Expand Down

0 comments on commit fb74554

Please sign in to comment.