diff --git a/src/Kontent/Ai/Delivery/DeliveryClient.php b/src/Kontent/Ai/Delivery/DeliveryClient.php index 0654c70..a7d6c8a 100644 --- a/src/Kontent/Ai/Delivery/DeliveryClient.php +++ b/src/Kontent/Ai/Delivery/DeliveryClient.php @@ -222,7 +222,7 @@ public function getType($codename) * * @param $params queryParams Specification of parameters for Taxonomy retrieval * - * @return array of retrieved Taxonomies + * @return object with array of retrieved Taxonomies */ public function getTaxonomies($params) { diff --git a/tests/E2E/ContentTypeFactoryTest.php b/tests/E2E/ContentTypeFactoryTest.php index 59a696b..6269e0e 100644 --- a/tests/E2E/ContentTypeFactoryTest.php +++ b/tests/E2E/ContentTypeFactoryTest.php @@ -22,7 +22,7 @@ public function testGetElement() { $client = $this->getClient(); $actual = $client->getElement('coffee', 'processing'); - + $this->assertEquals('Processing', $actual->name); } diff --git a/tests/E2E/DeliveryClientTest.php b/tests/E2E/DeliveryClientTest.php index 14cf096..987fcf5 100644 --- a/tests/E2E/DeliveryClientTest.php +++ b/tests/E2E/DeliveryClientTest.php @@ -195,13 +195,6 @@ public function testGetItemPreviewApiEmpty() $this->assertNull($item); } - public function testGetPreviewApiPresent() - { - $client = new DeliveryClient($this->getProjectId(), 'ew0KICAiYWxnIjogIkhTMjU2IiwNCiAgInR5cCI6ICJKV1QiDQp9.ew0KICAidWlkIjogInVzcl8wdk4xUTA1bks2YmlyQVQ2TU5wdkkwIiwNCiAgImVtYWlsIjogInBldHIuc3ZpaGxpa0BrZW50aWNvLmNvbSIsDQogICJwcm9qZWN0X2lkIjogIjk3NWJmMjgwLWZkOTEtNDg4Yy05OTRjLTJmMDQ0MTZlNWVlMyIsDQogICJqdGkiOiAibzhUdkc0OHFqX0ZUSWplVCIsDQogICJ2ZXIiOiAiMS4wLjAiLA0KICAiZ2l2ZW5fbmFtZSI6ICJQZXRyIiwNCiAgImZhbWlseV9uYW1lIjogIlN2aWhsaWsiLA0KICAiYXVkIjogInByZXZpZXcuZGVsaXZlci5rZW50aWNvY2xvdWQuY29tIg0KfQ.wd7_nOYInsdsoh9-0R43FnDQuVk_azPaYze7Ghxv43I'); - $item = $client->getItem('amsterdam'); - $this->assertEquals('e844a6aa-4dc4-464f-8ae9-f9f66cc6ab61', $item->system->id); - } - public function testGetContentItems() { $params = (new QueryParams())->type('article')->depth(2)->elements(array('personas')); diff --git a/tests/E2E/TaxonomyFactoryTest.php b/tests/E2E/TaxonomyFactoryTest.php index 2b8c662..39b5048 100644 --- a/tests/E2E/TaxonomyFactoryTest.php +++ b/tests/E2E/TaxonomyFactoryTest.php @@ -37,7 +37,7 @@ public function testCreateTaxonomies_SingleItemStructure_Matches() "4ce421e9-c403-eee8-fdc2-74f09392a749", "Manufacturer", "manufacturer", - "2017-09-07T08:15:22.7210000Z" + "2023-03-09T16:16:19.6167230Z" ); $term1 = new Taxonomies\Term(); @@ -112,7 +112,7 @@ public function testCreateTaxonomy_SingleTaxonomyResponse_NestedTaxonomyStructur "4ce421e9-c403-eee8-fdc2-74f09392a749", "Manufacturer", "manufacturer", - "2017-09-07T08:15:22.7210000Z" + "2023-03-09T16:16:19.6167230Z" ); $term1 = new Taxonomies\Term(); diff --git a/tests/Unit/DeliveryClientTest.php b/tests/Unit/DeliveryClientTest.php index 08c76d2..adfb685 100644 --- a/tests/Unit/DeliveryClientTest.php +++ b/tests/Unit/DeliveryClientTest.php @@ -28,6 +28,7 @@ public function test_ctor_previewKeyIsSetInHeaders() $previewKey = 'previewKey'; $client = new DeliveryClient($this->getProjectId(), 'previewKey'); $authorizationHeaderValue = Request::d('headers')['Authorization']; + $x = Request::d(null); $this->assertEquals('Bearer '.$previewKey, $authorizationHeaderValue); }