|
@@ 113-121 (lines=9) @@
|
| 110 |
|
self::assertSame($default, $psrCache->get($anotherKey, $default)); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
public function testGetWithFalseValueStoredInCache() |
| 114 |
|
{ |
| 115 |
|
$key = uniqid('key', true); |
| 116 |
|
|
| 117 |
|
$psrCache = new SimpleCacheAdapter(new ArrayCache()); |
| 118 |
|
$psrCache->set($key, false); |
| 119 |
|
|
| 120 |
|
self::assertFalse($psrCache->get($key, uniqid('default', true))); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
public function testSetProxiesToDoctrineSave() |
| 124 |
|
{ |
|
@@ 169-178 (lines=10) @@
|
| 166 |
|
* @param mixed $ttl |
| 167 |
|
* @dataProvider invalidTTLs |
| 168 |
|
*/ |
| 169 |
|
public function testSetWithInvalidTTL($ttl) |
| 170 |
|
{ |
| 171 |
|
$key = uniqid('key', true); |
| 172 |
|
$value = uniqid('value', true); |
| 173 |
|
|
| 174 |
|
$psrCache = new SimpleCacheAdapter(new ArrayCache()); |
| 175 |
|
|
| 176 |
|
$this->expectException(InvalidArgumentException::class); |
| 177 |
|
$psrCache->set($key, $value, $ttl); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
public function testDeleteProxiesToDoctrineDelete() |
| 181 |
|
{ |