|
@@ 28-34 (lines=7) @@
|
| 25 |
|
$this->shouldHaveType('Cmp\Cache\Cache'); |
| 26 |
|
} |
| 27 |
|
|
| 28 |
|
function it_executes_set_command_in_all_the_caches(Cache $cacheOne, Cache $cacheTwo) |
| 29 |
|
{ |
| 30 |
|
$cacheOne->set('foo', 'bar', 123)->willReturn(true); |
| 31 |
|
$cacheTwo->set('foo', 'bar', 123)->willReturn(true); |
| 32 |
|
|
| 33 |
|
$this->set('foo', 'bar', 123)->shouldReturn(true); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
function it_returns_false_if_a_cache_fails(Cache $cacheOne, Cache $cacheTwo) |
| 37 |
|
{ |
|
@@ 36-42 (lines=7) @@
|
| 33 |
|
$this->set('foo', 'bar', 123)->shouldReturn(true); |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
function it_returns_false_if_a_cache_fails(Cache $cacheOne, Cache $cacheTwo) |
| 37 |
|
{ |
| 38 |
|
$cacheOne->set('foo', 'bar', 123)->willReturn(true); |
| 39 |
|
$cacheTwo->set('foo', 'bar', 123)->willReturn(false); |
| 40 |
|
|
| 41 |
|
$this->set('foo', 'bar', 123)->shouldReturn(false); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
function it_does_not_ask_to_all_caches_if_one_has_the_item(Cache $cacheOne, Cache $cacheTwo) |
| 45 |
|
{ |