feat: trips-only chatbot MCP endpoint without editorial website text

This commit is contained in:
fromme committed 2026-10-12 14:43:46 +02:00
1 parent 9f805aaec7
commit 26d4140c18
7 files changed
+110 -11

No files matched your search

+17
View File
@@ -131,6 +131,23 @@ class TripCatalogTest extends TestCase
self::assertArrayNotHasKey('guide', $trip['dates'][0]);
}
public function testGetWithoutEditorialKeepsTheStructuredFieldsAndDropsThePageTexts(): void
{
$catalog = $this->catalog([$this->row('VTH', 2, '2026-12-05', 'HOT1', [$this->room(450)])]);
$full = $catalog->get('VTH');
$plain = $catalog->get('VTH', editorial: false);
self::assertNotNull($full);
self::assertNotNull($plain);
self::assertArrayHasKey('description', $full);
self::assertArrayHasKey('description', $full['hotels'][0]);
self::assertArrayNotHasKey('description', $plain);
self::assertArrayNotHasKey('description', $plain['hotels'][0]);
unset($full['description'], $full['hotels'][0]['description']);
self::assertSame($full, $plain);
}
public function testPickupSurchargesArePerLegAndAnUnpricedLegIsFree(): void
{
$row = $this->row('VTH', 2, '2026-12-05', 'HOT1', [$this->room(450)]);