feat: Loosen-IT logo top right on the settings page

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 15:26:44 +02:00
co-authored by Claude Opus 5.5
parent 909ac82594
commit 68ca4f45ec
4 changed files with 42 additions and 4 deletions
+17
View File
@@ -57,6 +57,23 @@ final class SettingsPageTest extends TestCase
self::assertSame(['verbindung', 'zugriff'], $page->tabSlugs());
}
public function testRendersTheLogoTopRightOnlyWhenGiven(): void
{
Functions\when('current_user_can')->justReturn(true);
Functions\when('esc_url')->returnArg();
ob_start();
(new SettingsPage([$this->tab('verbindung', 'Verbindung')], 'https://example.test/logo.svg'))->render();
$withLogo = (string) ob_get_clean();
ob_start();
(new SettingsPage([$this->tab('verbindung', 'Verbindung')]))->render();
$withoutLogo = (string) ob_get_clean();
self::assertStringContainsString('<img src="https://example.test/logo.svg" alt="Loosen-IT Logo"', $withLogo);
self::assertStringContainsString('right:0', $withLogo);
self::assertStringNotContainsString('lit-mcp-logo', $withoutLogo);
}
public function testUnknownTabFallsBackToTheFirstAndNoticesAreShown(): void
{
Functions\when('current_user_can')->justReturn(true);