| 1 | <?php |
||
| 15 | class CacheFactorySpec extends ObjectBehavior |
||
| 16 | { |
||
| 17 | function it_build_an_array_cache() |
||
| 18 | { |
||
| 19 | $this->arrayCache()->shouldBeAnInstanceOf('\Cmp\Cache\Backend\ArrayCache'); |
||
| 20 | } |
||
| 21 | |||
| 22 | function it_can_build_a_redis_cache(Redis $redis) |
||
| 23 | { |
||
| 24 | $this->redisCache($redis)->shouldBeAnInstanceOf('\Cmp\Cache\Backend\RedisCache'); |
||
| 25 | } |
||
| 26 | |||
| 27 | function it_can_chain_caches(Cache $one, Cache $two) |
||
| 28 | { |
||
| 29 | $this->chainCache([$one, $two])->shouldBeAnInstanceOf('\Cmp\Cache\Backend\ChainCache'); |
||
| 30 | } |
||
| 31 | |||
| 32 | function it_can_decorate_a_cache_with_login(Cache $cache) |
||
| 33 | { |
||
| 34 | $this->loggerCache($cache)->shouldBeAnInstanceOf('\Cmp\Cache\Decorator\LoggerCache'); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |