From e07e745f79d0b67a31a8c5dd95d014e193462dc0 Mon Sep 17 00:00:00 2001 From: SebastianKrupinski Date: Tue, 17 Dec 2024 12:16:03 -0500 Subject: [PATCH] fixup! fix: add ability to send alternet text (html and plain) Signed-off-by: SebastianKrupinski --- tests/Unit/Controller/DraftsControllerTest.php | 18 ++++++++++++++++++ tests/Unit/Controller/OutboxControllerTest.php | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/tests/Unit/Controller/DraftsControllerTest.php b/tests/Unit/Controller/DraftsControllerTest.php index 4e75bda085..e1f672aff1 100644 --- a/tests/Unit/Controller/DraftsControllerTest.php +++ b/tests/Unit/Controller/DraftsControllerTest.php @@ -194,6 +194,7 @@ public function testCreate(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -222,6 +223,7 @@ public function testCreate(): void { $actual = $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -243,6 +245,7 @@ public function testCreateFromDraft(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -273,6 +276,7 @@ public function testCreateFromDraft(): void { $actual = $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -298,6 +302,7 @@ public function testCreateWithEmptyRecipients(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -324,6 +329,7 @@ public function testCreateWithEmptyRecipients(): void { $actual = $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -345,6 +351,7 @@ public function testCreateAccountNotFound(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -365,6 +372,7 @@ public function testCreateAccountNotFound(): void { $actual = $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -384,6 +392,7 @@ public function testCreateDbException(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -403,6 +412,7 @@ public function testCreateDbException(): void { $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -423,6 +433,7 @@ public function testUpdate(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -451,6 +462,7 @@ public function testUpdate(): void { $message->getId(), $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -474,6 +486,7 @@ public function testUpdateMoveToOutbox(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -503,6 +516,7 @@ public function testUpdateMoveToOutbox(): void { $message->getId(), $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -528,6 +542,7 @@ public function testUpdateMessageNotFound(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -551,6 +566,7 @@ public function testUpdateMessageNotFound(): void { $message->getId(), $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -574,6 +590,7 @@ public function testUpdateDbException(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -602,6 +619,7 @@ public function testUpdateDbException(): void { $message->getId(), $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), diff --git a/tests/Unit/Controller/OutboxControllerTest.php b/tests/Unit/Controller/OutboxControllerTest.php index d0a02623ac..51f25603cf 100644 --- a/tests/Unit/Controller/OutboxControllerTest.php +++ b/tests/Unit/Controller/OutboxControllerTest.php @@ -259,6 +259,7 @@ public function testCreate(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -284,6 +285,7 @@ public function testCreate(): void { $actual = $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -327,6 +329,7 @@ public function testCreateAccountNotFound(): void { $actual = $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -347,6 +350,7 @@ public function testCreateDbException(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -368,6 +372,7 @@ public function testCreateDbException(): void { $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(), @@ -546,6 +551,7 @@ public function testCreateValidateCertificateId(): void { $message->setAccountId(1); $message->setAliasId(2); $message->setSubject('subject'); + $message->setBodyPlain(null); $message->setBodyHtml('

message

'); $message->setEditorBody('

message

'); $message->setHtml(true); @@ -570,6 +576,7 @@ public function testCreateValidateCertificateId(): void { $this->controller->create( $message->getAccountId(), $message->getSubject(), + $message->getBodyPlain(), $message->getBodyHtml(), '

message

', $message->isHtml(),