diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/lib/classes/StudipCachedArrayTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/lib/classes/StudipCachedArrayTest.php b/tests/unit/lib/classes/StudipCachedArrayTest.php index e473dc6..c98c1bd 100644 --- a/tests/unit/lib/classes/StudipCachedArrayTest.php +++ b/tests/unit/lib/classes/StudipCachedArrayTest.php @@ -48,6 +48,21 @@ class StudipCachedArrayTest extends \Codeception\Test\Unit $this->assertFalse(isset($cache[$key])); } + /** + * @depends testStorage + * @dataProvider StorageProvider + */ + public function testExpiration($key, $value) + { + $cache = $this->getCachedArray(); + + $cache[$key] = $value; + + $cache->expire(); + + $this->assertFalse(isset($cache[$key])); + } + public function StorageProvider(): array { return [ |
