diff options
Diffstat (limited to 'tests/Integration')
-rw-r--r-- | tests/Integration/Db/MessageTest.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/Integration/Db/MessageTest.php b/tests/Integration/Db/MessageTest.php index be891eed1..c0e5ac09f 100644 --- a/tests/Integration/Db/MessageTest.php +++ b/tests/Integration/Db/MessageTest.php @@ -84,7 +84,20 @@ class MessageTest extends TestCase { $message->setThreadRootId(null); $this->assertEquals($expected, $message->getMessageId()); - $this->assertNull($message->getThreadRootId()); + $this->assertNotNull($message->getThreadRootId()); + $this->assertEquals($expected, $message->getThreadRootId()); + } + + public function testThreadrootIdSet(): void { + $expected = '<abc@123.com>'; + $message = new Message(); + + $message->setMessageId($expected); + $message->setThreadRootId('<cde789@test.com>'); + + $this->assertEquals($expected, $message->getMessageId()); + $this->assertNotNull($message->getThreadRootId()); + $this->assertEquals('<cde789@test.com>', $message->getThreadRootId()); } public function testThreadrootIdEmptyString(): void { @@ -95,7 +108,8 @@ class MessageTest extends TestCase { $message->setThreadRootId(''); $this->assertEquals($expected, $message->getMessageId()); - $this->assertNull($message->getThreadRootId()); + $this->assertNotNull($message->getThreadRootId()); + $this->assertEquals($expected, $message->getThreadRootId()); } public function testSetInReplyToEmpty(): void { @@ -107,7 +121,8 @@ class MessageTest extends TestCase { $message->setInReplyTo(''); $this->assertEquals($expected, $message->getMessageId()); - $this->assertNull($message->getThreadRootId()); + $this->assertNotNull($message->getThreadRootId()); + $this->assertEquals($expected, $message->getThreadRootId()); $this->assertNull($message->getInReplyTo()); } } |