Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pabzm committed Oct 1, 2024
1 parent de99d41 commit add510a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Unit/Controller/DraftsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ public function testCreate(): void {
$message->setSendAt(null);
$message->setUpdatedAt(123456);
$message->setRequestMdn(false);
$message->setPgpMime(false);
$to = [['label' => 'Lewis', 'email' => '[email protected]']];
$cc = [['label' => 'Pierre', 'email' => '[email protected]']];

Expand Down Expand Up @@ -250,6 +251,7 @@ public function testCreateFromDraft(): void {
$message->setSendAt(null);
$message->setUpdatedAt(123456);
$message->setRequestMdn(false);
$message->setPgpMime(false);
$to = [['label' => 'Lewis', 'email' => '[email protected]']];
$cc = [['label' => 'Pierre', 'email' => '[email protected]']];

Expand Down Expand Up @@ -304,6 +306,7 @@ public function testCreateWithEmptyRecipients(): void {
$message->setSendAt(null);
$message->setUpdatedAt(123456);
$message->setRequestMdn(false);
$message->setPgpMime(false);

$account = new Account(new MailAccount());
$this->accountService->expects(self::once())
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Controller/ListControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public function testUnsupportedMessage(): void {
false,
false,
$this->createMock(Html::class),
false,
);
$this->serviceMock->getParameter('mailManager')
->expects(self::once())
Expand Down Expand Up @@ -206,6 +207,7 @@ public function testUnsubscribe(): void {
false,
false,
$this->createMock(Html::class),
false,
);
$this->serviceMock->getParameter('mailManager')
->expects(self::once())
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Controller/OutboxControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ public function testCreate(): void {
$message->setInReplyToMessageId('abc');
$message->setType(LocalMessage::TYPE_OUTGOING);
$message->setRequestMdn(false);
$message->setPgpMime(false);
$to = [['label' => 'Lewis', 'email' => '[email protected]']];
$cc = [['label' => 'Pierre', 'email' => '[email protected]']];

Expand Down
3 changes: 3 additions & 0 deletions tests/Unit/Model/IMAPMessageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function testIconvHtmlMessage() {
false,
false,
$htmlService,
false,
);

$actualHtmlBody = $message->getHtmlBody(123);
Expand Down Expand Up @@ -123,6 +124,7 @@ public function testSerialize() {
false,
false,
$this->htmlService,
false,
);

$json = $m->jsonSerialize();
Expand Down Expand Up @@ -156,6 +158,7 @@ public function testSerialize() {
'hasDkimSignature' => false,
'phishingDetails' => [],
'scheduling' => [],
'isPgpMimeEncrypted' => false,
], $json);
$this->assertEquals(1234, $json['uid']);
}
Expand Down

0 comments on commit add510a

Please sign in to comment.