Skip to content

Commit 41f7986

Browse files
authored
Add test case for Cache::getValue() with non existent key (#19396)
1 parent 98e9308 commit 41f7986

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/framework/caching/CacheTestCase.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,13 @@ public function testArrayAccess()
156156
$this->assertInstanceOf('stdClass', $cache['arrayaccess_test']);
157157
}
158158

159+
public function testGetValueNonExistent()
160+
{
161+
$cache = $this->getCacheInstance();
162+
163+
$this->assertFalse($this->invokeMethod($cache, 'getValue', ['non_existent_key']));
164+
}
165+
159166
public function testGetNonExistent()
160167
{
161168
$cache = $this->getCacheInstance();

0 commit comments

Comments
 (0)