allows('oauthEnabled')->andReturn($oauth); $status->allows('discovery')->with(false)->andReturn($discovery); $status->allows('https')->andReturn($https); return $status; } public function testWarnsAboutDisabledOAuthAndBrokenDiscoveryEverywhere(): void { $messages = (new AdminNotices($this->status(false, ['status' => 'critical'], true)))->messages(false); self::assertCount(2, $messages); self::assertStringContainsString('OAuth-Server ist deaktiviert', $messages[0]); self::assertStringContainsString('/.well-known/', $messages[1]); } public function testHttpsHintOnlyOnTheSettingsPage(): void { $notices = new AdminNotices($this->status(true, null, false)); self::assertSame([], $notices->messages(false)); self::assertCount(1, $notices->messages(true)); } }