From ce4122257cf0dd295ed3be831d651c49402afaa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanislav=20Janu=CC=8A?= Date: Thu, 9 Nov 2023 09:41:46 +0100 Subject: [PATCH] Fix tests --- tests/Endpoints/Contactlists/Search/RequestTest.php | 1 + tests/Endpoints/Contacts/Search/RequestTest.php | 2 ++ tests/Endpoints/CustomFields/Search/RequestTest.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/tests/Endpoints/Contactlists/Search/RequestTest.php b/tests/Endpoints/Contactlists/Search/RequestTest.php index 7af5b0a..137cdd8 100644 --- a/tests/Endpoints/Contactlists/Search/RequestTest.php +++ b/tests/Endpoints/Contactlists/Search/RequestTest.php @@ -29,6 +29,7 @@ public function testDefaultEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(0, $query['offset'], 'The first page should have 0 offset'); diff --git a/tests/Endpoints/Contacts/Search/RequestTest.php b/tests/Endpoints/Contacts/Search/RequestTest.php index 7a3ca29..2eef99a 100644 --- a/tests/Endpoints/Contacts/Search/RequestTest.php +++ b/tests/Endpoints/Contacts/Search/RequestTest.php @@ -31,6 +31,7 @@ public function testDefaultEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(0, $query['offset'], 'The first page should have 0 offset'); @@ -57,6 +58,7 @@ public function testFilteredEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(50, $query['offset'], 'The second page should the limit value'); diff --git a/tests/Endpoints/CustomFields/Search/RequestTest.php b/tests/Endpoints/CustomFields/Search/RequestTest.php index 651e303..a16ef8f 100644 --- a/tests/Endpoints/CustomFields/Search/RequestTest.php +++ b/tests/Endpoints/CustomFields/Search/RequestTest.php @@ -32,6 +32,7 @@ public function testDefaultEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(0, $query['offset'], 'The first page should have 0 offset'); @@ -58,6 +59,7 @@ public function testFilteredEndpoint(): void // The query parameters to send $query = $value['query']; + $this->assertTrue(is_array($query), 'Query must be an array'); $this->assertArrayHasKey('limit', $query); $this->assertArrayHasKey('offset', $query); $this->assertEquals(50, $query['offset'], 'The second page should the limit value');