19declare(strict_types=1);
24use PHPUnit\Framework\Attributes\DataProvider;
25use PHPUnit\Framework\TestCase;
31 protected function setUp(): void
36 #[DataProvider('validKeys')]
39 $this->rules->check($key);
41 $this->addToAssertionCount(1);
50 'plain' => [
'sort_column'],
51 'dotted' => [
'view.sort.column'],
52 'php namespace' => [
'ILIAS\\UI\\Implementation\\Component\\Table\\Data_my_table'],
53 'braces' => [
'{tpl}'],
55 'at sign' => [
'user@example'],
56 'unicode' => [
'Ümläut'],
61 #[DataProvider('invalidKeys')]
64 $this->expectException(\InvalidArgumentException::class);
66 $this->rules->check($key);
77 'null byte' => [
"a\0b"],
78 'newline' => [
"a\nb"],
79 'delete' => [
"a\x7Fb"],
88 $this->addToAssertionCount(1);
The rules every storage key has to follow.
testInvalidKeysAreRejected(string $key)
testValidKeysPass(string $key)
testLengthIsCountedInCharactersNotBytes()