| @@ 52-64 (lines=13) @@ | ||
| 49 | /** |
|
| 50 | * Test that CacheStorageInterface::has() is called |
|
| 51 | */ |
|
| 52 | public function testHas() |
|
| 53 | { |
|
| 54 | $key = 'key'; |
|
| 55 | $this->storageMock->expects($this->once()) |
|
| 56 | ->method('has') |
|
| 57 | ->with( |
|
| 58 | $this->equalTo($key) |
|
| 59 | ); |
|
| 60 | $this->cache->has($key); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * Test that CacheStorageInterface::set() is called |
|
| 65 | */ |
|
| 66 | public function testSet() |
|
| 67 | { |
|
| @@ 85-96 (lines=12) @@ | ||
| 82 | /** |
|
| 83 | * Test that CacheStorageInterface::get() is called |
|
| 84 | */ |
|
| 85 | public function testGet() |
|
| 86 | { |
|
| 87 | $key = 'key'; |
|
| 88 | $this->storageMock->expects($this->once()) |
|
| 89 | ->method('get') |
|
| 90 | ->with( |
|
| 91 | $this->equalTo($key) |
|
| 92 | ); |
|
| 93 | $this->cache->get($key); |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * Test that CacheStorageInterface::delete() is called |
|
| 98 | */ |
|
| 99 | public function testDelete() |
|
| @@ 99-110 (lines=12) @@ | ||
| 96 | /** |
|
| 97 | * Test that CacheStorageInterface::delete() is called |
|
| 98 | */ |
|
| 99 | public function testDelete() |
|
| 100 | { |
|
| 101 | $key = 'key'; |
|
| 102 | $this->storageMock->expects($this->once()) |
|
| 103 | ->method('delete') |
|
| 104 | ->with( |
|
| 105 | $this->equalTo($key) |
|
| 106 | ); |
|
| 107 | $this->cache->delete($key); |
|
| 108 | } |
|
| 109 | ||
| 110 | /** |
|
| 111 | * Test that Cache::withCacheStorage() updates CacheStorageInterface adaptor. |
|
| 112 | */ |
|
| 113 | public function testWithCacheStorage() |
|