|
@@ 207-217 (lines=11) @@
|
| 204 |
|
/** |
| 205 |
|
* @throws \Psr\SimpleCache\InvalidArgumentException |
| 206 |
|
*/ |
| 207 |
|
public function testDeleteProxiesToDoctrineDelete() |
| 208 |
|
{ |
| 209 |
|
$key = uniqid('key', true); |
| 210 |
|
|
| 211 |
|
/** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */ |
| 212 |
|
$doctrineCache = $this->createMock(FullyImplementedCache::class); |
| 213 |
|
$doctrineCache->expects(self::once())->method('delete')->with($key)->willReturn(true); |
| 214 |
|
|
| 215 |
|
$psrCache = new SimpleCacheAdapter($doctrineCache); |
| 216 |
|
self::assertTrue($psrCache->delete($key)); |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
public function testClearProxiesToDeleteAll() |
| 220 |
|
{ |
|
@@ 471-481 (lines=11) @@
|
| 468 |
|
/** |
| 469 |
|
* @throws \Psr\SimpleCache\InvalidArgumentException |
| 470 |
|
*/ |
| 471 |
|
public function testHasProxiesToDoctrineContains() |
| 472 |
|
{ |
| 473 |
|
$key = uniqid('key', true); |
| 474 |
|
|
| 475 |
|
/** @var FullyImplementedCache|\PHPUnit_Framework_MockObject_MockObject $doctrineCache */ |
| 476 |
|
$doctrineCache = $this->createMock(FullyImplementedCache::class); |
| 477 |
|
$doctrineCache->expects(self::once())->method('contains')->with($key)->willReturn(true); |
| 478 |
|
|
| 479 |
|
$psrCache = new SimpleCacheAdapter($doctrineCache); |
| 480 |
|
self::assertTrue($psrCache->has($key)); |
| 481 |
|
} |
| 482 |
|
} |
| 483 |
|
|