Selbst gehostetes Umami (sys.adametz.media) je Brand: Website-IDs aus dev/release/umami.md in config/domains.php, Snippet via x-web.umami im web-master-Layout auf allen oeffentlichen Seiten der drei Domains. UMAMI_ENABLED=false haelt es aus, bis die Webseiten live gehen (User-Vorgabe 06.07.; Go-Live-Checkliste WS-7 ergaenzt). Damit stimmt Datenschutz Abschnitt 5 mit dem Code ueberein. User bestaetigt ausserdem: Log-/Backup-Fristen und Stripe-Entitaet passen wie eingetragen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
26 lines
1.1 KiB
PHP
26 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Tests\TestCase;
|
|
|
|
test('the umami snippet stays off until the go-live switch is set', function () {
|
|
/** @var TestCase $this */
|
|
// Default (UMAMI_ENABLED=false): kein Analytics-Script vor dem Go-Live.
|
|
$this->get('https://presseecho.test/de')
|
|
->assertSuccessful()
|
|
->assertDontSee('sys.adametz.media', false);
|
|
});
|
|
|
|
test('the umami snippet renders the website id of the requested brand', function (string $host, string $websiteId) {
|
|
/** @var TestCase $this */
|
|
config()->set('services.umami.enabled', true);
|
|
|
|
// /de/faq existiert auf allen drei Hosts (die Hub-Startseite liegt auf /).
|
|
$this->get("https://{$host}/de/faq")
|
|
->assertSuccessful()
|
|
->assertSee('https://sys.adametz.media/config.js', false)
|
|
->assertSee('data-website-id="'.$websiteId.'"', false);
|
|
})->with([
|
|
'presseecho' => ['presseecho.test', '3ea8a7b0-105d-4519-b200-138cadc0fbdc'],
|
|
'businessportal24' => ['businessportal24.test', 'f03a5fc3-ac44-488f-9118-84004861099f'],
|
|
'pressekonto hub' => ['pressekonto.test', 'ca440b65-a5bd-42c1-8cdb-96f34734003c'],
|
|
]);
|