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 <noreply@anthropic.com>
This commit is contained in:
Simon Kuehn 2026-05-18 20:29:47 +00:00
parent 0fdb4979c1
commit 929f5a0b2d

View file

@ -134,4 +134,20 @@ final class EbayTaxonomyIntegrationTest extends TestCase
$names = array_map(static fn (array $a) => $a['name'], $aspects); $names = array_map(static fn (array $a) => $a['name'], $aspects);
$this->assertNotEmpty($names); $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']);
}
}
} }