|
@@ 125-133 (lines=9) @@
|
| 122 |
|
/** |
| 123 |
|
* @throws \Psr\SimpleCache\InvalidArgumentException |
| 124 |
|
*/ |
| 125 |
|
public function testGetWithFalseValueStoredInCache() |
| 126 |
|
{ |
| 127 |
|
$key = uniqid('key', true); |
| 128 |
|
|
| 129 |
|
$psrCache = new SimpleCacheAdapter(new ArrayCache()); |
| 130 |
|
$psrCache->set($key, false); |
| 131 |
|
|
| 132 |
|
self::assertFalse($psrCache->get($key, uniqid('default', true))); |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
/** |
| 136 |
|
* @throws \Psr\SimpleCache\InvalidArgumentException |
|
@@ 193-202 (lines=10) @@
|
| 190 |
|
* @dataProvider invalidTTLs |
| 191 |
|
* @throws \Psr\SimpleCache\InvalidArgumentException |
| 192 |
|
*/ |
| 193 |
|
public function testSetWithInvalidTTL($ttl) |
| 194 |
|
{ |
| 195 |
|
$key = uniqid('key', true); |
| 196 |
|
$value = uniqid('value', true); |
| 197 |
|
|
| 198 |
|
$psrCache = new SimpleCacheAdapter(new ArrayCache()); |
| 199 |
|
|
| 200 |
|
$this->expectException(InvalidArgumentException::class); |
| 201 |
|
$psrCache->set($key, $value, $ttl); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
/** |
| 205 |
|
* @throws \Psr\SimpleCache\InvalidArgumentException |