‪TYPO3CMS  10.4
RegistryTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪RegistryTest extends UnitTestCase
25 {
30  {
31  $this->expectException(\InvalidArgumentException::class);
32  $this->expectExceptionCode(1249755131);
33  (new ‪Registry())->get('', 'someKey');
34  }
35 
40  {
41  $this->expectException(\InvalidArgumentException::class);
42  $this->expectExceptionCode(1249755131);
43  (new ‪Registry())->get('t', 'someKey');
44  }
45 
50  {
51  $this->expectException(\InvalidArgumentException::class);
52  $this->expectExceptionCode(1249755131);
53  (new ‪Registry())->set('', 'someKey', 'someValue');
54  }
55 
60  {
61  $this->expectException(\InvalidArgumentException::class);
62  $this->expectExceptionCode(1249755131);
63  (new ‪Registry())->set('t', 'someKey', 'someValue');
64  }
65 
70  {
71  $this->expectException(\InvalidArgumentException::class);
72  $this->expectExceptionCode(1249755131);
73  (new ‪Registry())->remove('t', 'someKey');
74  }
75 
80  {
81  $this->expectException(\InvalidArgumentException::class);
82  $this->expectExceptionCode(1249755131);
83  (new ‪Registry())->removeAllByNamespace('');
84  }
85 }
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest\setThrowsAnExceptionOnEmptyNamespace
‪setThrowsAnExceptionOnEmptyNamespace()
Definition: RegistryTest.php:49
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest\setThrowsAnExceptionOnWrongNamespace
‪setThrowsAnExceptionOnWrongNamespace()
Definition: RegistryTest.php:59
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest\getThrowsExceptionForInvalidNamespacesUsingNoNamespace
‪getThrowsExceptionForInvalidNamespacesUsingNoNamespace()
Definition: RegistryTest.php:29
‪TYPO3\CMS\Core\Registry
Definition: Registry.php:33
‪TYPO3\CMS\Core\Tests\Unit
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest\removeThrowsAnExceptionOnWrongNamespace
‪removeThrowsAnExceptionOnWrongNamespace()
Definition: RegistryTest.php:69
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest\getThrowsExceptionForInvalidNamespacesUsingTooShortNamespace
‪getThrowsExceptionForInvalidNamespacesUsingTooShortNamespace()
Definition: RegistryTest.php:39
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest
Definition: RegistryTest.php:25
‪TYPO3\CMS\Core\Tests\Unit\RegistryTest\removeAllByNamespaceThrowsAnExceptionOnWrongNamespace
‪removeAllByNamespaceThrowsAnExceptionOnWrongNamespace()
Definition: RegistryTest.php:79