Re-usable ACL checks on teams (#5925)

This commit is contained in:
Kevin Papst
2026-04-26 17:06:59 +02:00
committed by GitHub
parent 7a559a09e6
commit 20c7b03bd9
14 changed files with 1393 additions and 149 deletions

View File

@@ -77,4 +77,22 @@ class ContextTest extends TestCase
$sut = $this->getSut($this->getDefaultSettings(), ['X-Requested-With' => 'Kimai']);
self::assertTrue($sut->isJavascriptRequest());
}
public function testDeprecatedGetBrandingAlwaysReturnsNull(): void
{
$sut = $this->getSut($this->getDefaultSettings());
$previousHandler = set_error_handler(static function (int $type, string $message): true {
self::assertSame(E_USER_DEPRECATED, $type);
self::assertSame('Use config() instead of "kimai_context" to access system configurations', $message);
return true;
});
try {
self::assertNull($sut->getBranding('legacyAccess'));
} finally {
restore_error_handler();
}
}
}