Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
test(sdk): use the gateway's 'text' message type in PHP search tests
Yudhi Armyndharisad3530cd62d1
diff --git a/sdk/php/tests/SearchTest.php b/sdk/php/tests/SearchTest.phpindex 21b6fd83b..56c1295ec 100644--- a/sdk/php/tests/SearchTest.php+++ b/sdk/php/tests/SearchTest.php@@ -18,7 +18,7 @@ class SearchTest extends TestCase'body' => 'hello world','snippet' => '<mark>hello</mark> world','timestamp' => 1717900000,- 'type' => 'chat',+ 'type' => 'text','direction' => 'incoming','from' => '[email protected]','score' => 1.5,@@ -68,14 +68,14 @@ class SearchTest extends TestCase$client->search->search(['q' => 'term','chatId' => null,- 'type' => 'chat',+ 'type' => 'text','dateFrom' => null,]);$query = $backend->lastCall()['query'];// `q` and a present `type` are sent; null `chatId`/`dateFrom` are omitted.$this->assertStringContainsString('q=term', $query);- $this->assertStringContainsString('type=chat', $query);+ $this->assertStringContainsString('type=text', $query);$this->assertStringNotContainsString('chatId=', $query);$this->assertStringNotContainsString('dateFrom=', $query);}