From 929f5a0b2d2a87af2b507083e4378edf67045d03 Mon Sep 17 00:00:00 2001 From: Simon Kuehn Date: Mon, 18 May 2026 20:29:47 +0000 Subject: [PATCH] test: add category suggestions integration test Verifies getCategorySuggestions() returns id/name/path shaped results from the eBay sandbox Taxonomy API. Co-Authored-By: Claude Sonnet 4.6 --- .../Channel/Ebay/EbayTaxonomyIntegrationTest.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/Integration/Infrastructure/Channel/Ebay/EbayTaxonomyIntegrationTest.php b/tests/Integration/Infrastructure/Channel/Ebay/EbayTaxonomyIntegrationTest.php index eedc870..abe37c2 100644 --- a/tests/Integration/Infrastructure/Channel/Ebay/EbayTaxonomyIntegrationTest.php +++ b/tests/Integration/Infrastructure/Channel/Ebay/EbayTaxonomyIntegrationTest.php @@ -134,4 +134,20 @@ final class EbayTaxonomyIntegrationTest extends TestCase $names = array_map(static fn (array $a) => $a['name'], $aspects); $this->assertNotEmpty($names); } + + public function test_category_suggestions_returns_results(): void + { + $results = $this->taxonomy->getCategorySuggestions('Notebook'); + + $this->assertNotEmpty($results, 'Sandbox must return at least one suggestion for "Notebook"'); + + foreach ($results as $result) { + $this->assertArrayHasKey('id', $result); + $this->assertArrayHasKey('name', $result); + $this->assertArrayHasKey('path', $result); + $this->assertIsString($result['id']); + $this->assertNotEmpty($result['id']); + $this->assertIsString($result['name']); + } + } }