From 5c60cc19877fc94bee53746ca29304771054c667 Mon Sep 17 00:00:00 2001 From: gam6itko-home Date: Tue, 14 Jul 2020 18:18:47 +0300 Subject: [PATCH] tests --- CHANGELOG.md | 9 +++++++++ tests/Service/V2/CategoryServiceTest.php | 21 ++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 152e30e..6ad0198 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +# 0.4.1 +- ProductValidator для экспорта товаров V2. При создании экземпляра объекта необходимо передать вторым аргументом версию API. +- CategoryService::attributeValues возвращает массив содержащий ключи [result, has_next]. + + +# 0.4.0 +- При создании экземпляра Service-класса необходимо передать объект класса `Psr\Http\Client\ClientInterface`. + + # 0.3.0 - Удалены `deprecated` методы. - declare(strict_types=1); diff --git a/tests/Service/V2/CategoryServiceTest.php b/tests/Service/V2/CategoryServiceTest.php index 9052b7d..6dbf94a 100644 --- a/tests/Service/V2/CategoryServiceTest.php +++ b/tests/Service/V2/CategoryServiceTest.php @@ -30,6 +30,20 @@ public function testAttribute(): void public function testAttributeValues() { + $responseJson = <<quickTest( 'attributeValues', [ @@ -41,7 +55,12 @@ public function testAttributeValues() 'POST', '/v2/category/attribute/values', '{"category_id":17036076,"attribute_id":8229,"limit":1,"last_value_id":0,"language":"EN"}', - ] + ], + $responseJson, + function (array $result) { + self::assertArrayHasKey('result', $result); + self::assertArrayHasKey('has_next', $result); + } ); }