From 63ad125859a7e176f0534aa02ed0139a809797e4 Mon Sep 17 00:00:00 2001 From: Lars Date: Sun, 29 Nov 2026 18:49:34 +0100 Subject: [PATCH] =?UTF-8?q?Mache=20den=20Vergleich=20der=20Abschnittsausga?= =?UTF-8?q?be=20unabh=C3=A4ngig=20von=20der=20Basisadresse?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Vorlage enthielt die lokale Adresse des Bildpfads; die CI hat eine andere APP_URL. Co-Authored-By: Claude Sonnet 5.5 --- tests/Feature/CmsSectionLegacyRenderTest.php | 2 ++ tests/Fixtures/section-legacy-render.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Feature/CmsSectionLegacyRenderTest.php b/tests/Feature/CmsSectionLegacyRenderTest.php index 297292b..85c5cc9 100644 --- a/tests/Feature/CmsSectionLegacyRenderTest.php +++ b/tests/Feature/CmsSectionLegacyRenderTest.php @@ -90,6 +90,8 @@ private function sectionsMarkup(string $html): string $end = strpos($html, ''); $markup = substr($html, $start, $end - $start); $markup = (string) preg_replace('/\b(id|aria-labelledby|aria-describedby|for)="([^"]*[0-9a-f]{8}-[0-9a-f]{4}-[^"]*)"/', '$1="#"', $markup); + // Die Basisadresse hängt von der Umgebung ab (APP_URL), die Pfade der Bilder nicht. + $markup = (string) preg_replace('#https?://[^/"\s]+/medien/#', 'HOST/medien/', $markup); $markup = (string) preg_replace('/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/', 'UUID', $markup); return trim($markup)."\n"; diff --git a/tests/Fixtures/section-legacy-render.html b/tests/Fixtures/section-legacy-render.html index 58c7a11..a3fdd84 100644 --- a/tests/Fixtures/section-legacy-render.html +++ b/tests/Fixtures/section-legacy-render.html @@ -1 +1 @@ -

default narrow

Text default narrow

default standard

Text default standard

default wide

Text default wide

default full

Text default full

light wide

Text light wide

dark narrow

Text dark narrow

dark standard

Text dark standard

dark wide

Text dark wide

dark full

Text dark full

accent wide

Text accent wide

Bild light center

Bild light top_left

Bild dark center

Bild dark top_left

Bild none center

Bild none top_left

Abstand none

Rechts

Abstand compact

Rechts

Abstand normal

Rechts

Abstand large

Rechts

Trenner Akzent

Eins

Drei

+

default narrow

Text default narrow

default standard

Text default standard

default wide

Text default wide

default full

Text default full

light wide

Text light wide

dark narrow

Text dark narrow

dark standard

Text dark standard

dark wide

Text dark wide

dark full

Text dark full

accent wide

Text accent wide

Bild light center

Bild light top_left

Bild dark center

Bild dark top_left

Bild none center

Bild none top_left

Abstand none

Rechts

Abstand compact

Rechts

Abstand normal

Rechts

Abstand large

Rechts

Trenner Akzent

Eins

Drei