| @@ 34-46 (lines=13) @@ | ||
| 31 | $this->assertSame($this->storageMock,$storage); |
|
| 32 | } |
|
| 33 | ||
| 34 | public function testHas() |
|
| 35 | { |
|
| 36 | ||
| 37 | $key = 'key'; |
|
| 38 | ||
| 39 | $this->storageMock->expects($this->once()) |
|
| 40 | ->method('has') |
|
| 41 | ->with( |
|
| 42 | $this->equalTo($key) |
|
| 43 | ); |
|
| 44 | ||
| 45 | $this->cache->has($key); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function testSet() |
|
| 49 | { |
|
| @@ 102-113 (lines=12) @@ | ||
| 99 | $this->cache->set($key, $value); |
|
| 100 | } |
|
| 101 | ||
| 102 | public function testGet() |
|
| 103 | { |
|
| 104 | $key = 'key'; |
|
| 105 | ||
| 106 | $this->storageMock->expects($this->once()) |
|
| 107 | ->method('get') |
|
| 108 | ->with( |
|
| 109 | $this->equalTo($key) |
|
| 110 | ); |
|
| 111 | ||
| 112 | $this->cache->get($key); |
|
| 113 | } |
|
| 114 | ||
| 115 | public function testDelete() |
|
| 116 | { |
|
| @@ 115-126 (lines=12) @@ | ||
| 112 | $this->cache->get($key); |
|
| 113 | } |
|
| 114 | ||
| 115 | public function testDelete() |
|
| 116 | { |
|
| 117 | $key = 'key'; |
|
| 118 | ||
| 119 | $this->storageMock->expects($this->once()) |
|
| 120 | ->method('delete') |
|
| 121 | ->with( |
|
| 122 | $this->equalTo($key) |
|
| 123 | ); |
|
| 124 | ||
| 125 | $this->cache->delete($key); |
|
| 126 | } |
|
| 127 | ||
| 128 | public function testWithCacheStorage() |
|
| 129 | { |
|