From 7eb8c6112b926f63def45418542650b68ce36a57 Mon Sep 17 00:00:00 2001 From: Miguel Rosales Sueiro Date: Fri, 18 Feb 2022 14:55:46 +0100 Subject: [PATCH] Update tests after adding 'text' property to Custom Fields. --- tests/Conversations/ConversationTest.php | 2 ++ tests/Conversations/CustomFieldTest.php | 6 ++++++ tests/Conversations/CustomFieldsCollectionTest.php | 2 ++ 3 files changed, 10 insertions(+) diff --git a/tests/Conversations/ConversationTest.php b/tests/Conversations/ConversationTest.php index 0d55ff2e..203a3ab8 100644 --- a/tests/Conversations/ConversationTest.php +++ b/tests/Conversations/ConversationTest.php @@ -238,6 +238,7 @@ public function testExtract() $this->assertInstanceOf(CustomField::class, $customField->setId(936)); $this->assertInstanceOf(CustomField::class, $customField->setName('Account Type')); $customField->setValue('Administrator'); + $customField->setText('Administrator'); $conversation->setCustomFields(new Collection([ $customField, ])); @@ -349,6 +350,7 @@ public function testExtract() 'id' => 936, 'name' => 'Account Type', 'value' => 'Administrator', + 'text' => 'Administrator', ]], $extractedConversation['fields'] ); diff --git a/tests/Conversations/CustomFieldTest.php b/tests/Conversations/CustomFieldTest.php index fcc3c473..29509251 100644 --- a/tests/Conversations/CustomFieldTest.php +++ b/tests/Conversations/CustomFieldTest.php @@ -16,11 +16,13 @@ public function testHydrate() 'id' => 6688, 'name' => 'Account Type', 'value' => 'Premium', + 'text' => 'Premium', ]); $this->assertSame(6688, $customField->getId()); $this->assertSame('Account Type', $customField->getName()); $this->assertSame('Premium', $customField->getValue()); + $this->assertSame('Premium', $customField->getText()); } public function testExtract() @@ -29,11 +31,13 @@ public function testExtract() $this->assertInstanceOf(CustomField::class, $customField->setId(6688)); $this->assertInstanceOf(CustomField::class, $customField->setName('Account Type')); $this->assertInstanceOf(CustomField::class, $customField->setValue('Premium')); + $this->assertInstanceOf(CustomField::class, $customField->setText('Premium')); $this->assertSame([ 'id' => 6688, 'name' => 'Account Type', 'value' => 'Premium', + 'text' => 'Premium', ], $customField->extract()); } @@ -48,6 +52,7 @@ public function testExtractFormatsDateTime() 'id' => 6688, 'name' => 'Account Type', 'value' => '2017-01-02', + 'text' => null, ], $customField->extract()); } @@ -59,6 +64,7 @@ public function testExtractNewEntity() 'id' => null, 'name' => null, 'value' => null, + 'text' => null, ], $customField->extract()); } } diff --git a/tests/Conversations/CustomFieldsCollectionTest.php b/tests/Conversations/CustomFieldsCollectionTest.php index 30b84ca1..4580e6a6 100644 --- a/tests/Conversations/CustomFieldsCollectionTest.php +++ b/tests/Conversations/CustomFieldsCollectionTest.php @@ -18,6 +18,7 @@ public function testExtract() $customField->setId(936); $customField->setName('Account Type'); $customField->setValue('Administrator'); + $customField->setText('Administrator'); $customFieldsCollection->setCustomFields([ $customField, @@ -29,6 +30,7 @@ public function testExtract() 'id' => 936, 'name' => 'Account Type', 'value' => 'Administrator', + 'text' => 'Administrator', ], ], ], $customFieldsCollection->extract());