|
@@ 53-59 (lines=7) @@
|
| 50 |
|
$cacheTwo->set('foo')->shouldNotHaveBeenCalled(); |
| 51 |
|
} |
| 52 |
|
|
| 53 |
|
function it_tries_all_the_caches_before_failing_to_checking_for_an_item(Cache $cacheOne, Cache $cacheTwo) |
| 54 |
|
{ |
| 55 |
|
$cacheOne->has('foo')->willReturn(false); |
| 56 |
|
$cacheTwo->has('foo')->willReturn(false); |
| 57 |
|
|
| 58 |
|
$this->has('foo')->shouldReturn(false); |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
function it_does_not_ask_to_all_caches_if_one_get_the_item(Cache $cacheOne, Cache $cacheTwo) |
| 62 |
|
{ |
|
@@ 107-113 (lines=7) @@
|
| 104 |
|
$this->shouldThrow(new NotFoundException('foo'))->duringDemand('foo'); |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
function it_deletes_the_item_in_all_caches(Cache $cacheOne, Cache $cacheTwo) |
| 108 |
|
{ |
| 109 |
|
$cacheOne->delete('foo')->willReturn(true); |
| 110 |
|
$cacheTwo->delete('foo')->willReturn(true); |
| 111 |
|
|
| 112 |
|
$this->delete('foo')->shouldReturn(true); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
function it_flushes_all_caches(Cache $cacheOne, Cache $cacheTwo) |
| 116 |
|
{ |
|
@@ 115-121 (lines=7) @@
|
| 112 |
|
$this->delete('foo')->shouldReturn(true); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
function it_flushes_all_caches(Cache $cacheOne, Cache $cacheTwo) |
| 116 |
|
{ |
| 117 |
|
$cacheOne->flush()->willReturn(true); |
| 118 |
|
$cacheTwo->flush()->willReturn(true); |
| 119 |
|
|
| 120 |
|
$this->flush()->shouldReturn(true); |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
function it_can_retrieve_the_time_to_live(Cache $cacheOne, Cache $cacheTwo) |
| 124 |
|
{ |