Skip to content

Commit

Permalink
fixup! fix: add ability to send alternet text (html and plain)
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Dec 17, 2024
1 parent 04cec39 commit e07e745
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Unit/Controller/DraftsControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ public function testCreate(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand Down Expand Up @@ -222,6 +223,7 @@ public function testCreate(): void {
$actual = $this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -243,6 +245,7 @@ public function testCreateFromDraft(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand Down Expand Up @@ -273,6 +276,7 @@ public function testCreateFromDraft(): void {
$actual = $this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -298,6 +302,7 @@ public function testCreateWithEmptyRecipients(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -324,6 +329,7 @@ public function testCreateWithEmptyRecipients(): void {
$actual = $this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -345,6 +351,7 @@ public function testCreateAccountNotFound(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -365,6 +372,7 @@ public function testCreateAccountNotFound(): void {
$actual = $this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -384,6 +392,7 @@ public function testCreateDbException(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -403,6 +412,7 @@ public function testCreateDbException(): void {
$this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -423,6 +433,7 @@ public function testUpdate(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand Down Expand Up @@ -451,6 +462,7 @@ public function testUpdate(): void {
$message->getId(),
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -474,6 +486,7 @@ public function testUpdateMoveToOutbox(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand Down Expand Up @@ -503,6 +516,7 @@ public function testUpdateMoveToOutbox(): void {
$message->getId(),
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -528,6 +542,7 @@ public function testUpdateMessageNotFound(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -551,6 +566,7 @@ public function testUpdateMessageNotFound(): void {
$message->getId(),
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -574,6 +590,7 @@ public function testUpdateDbException(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand Down Expand Up @@ -602,6 +619,7 @@ public function testUpdateDbException(): void {
$message->getId(),
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand Down
7 changes: 7 additions & 0 deletions tests/Unit/Controller/OutboxControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public function testCreate(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -284,6 +285,7 @@ public function testCreate(): void {
$actual = $this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand Down Expand Up @@ -327,6 +329,7 @@ public function testCreateAccountNotFound(): void {
$actual = $this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand All @@ -347,6 +350,7 @@ public function testCreateDbException(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -368,6 +372,7 @@ public function testCreateDbException(): void {
$this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand Down Expand Up @@ -546,6 +551,7 @@ public function testCreateValidateCertificateId(): void {
$message->setAccountId(1);
$message->setAliasId(2);
$message->setSubject('subject');
$message->setBodyPlain(null);
$message->setBodyHtml('<p>message</p>');
$message->setEditorBody('<p>message</p>');
$message->setHtml(true);
Expand All @@ -570,6 +576,7 @@ public function testCreateValidateCertificateId(): void {
$this->controller->create(
$message->getAccountId(),
$message->getSubject(),
$message->getBodyPlain(),
$message->getBodyHtml(),
'<p>message</p>',
$message->isHtml(),
Expand Down

0 comments on commit e07e745

Please sign in to comment.