Ejemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param AdapterInterface $adapter
  * @param CacheInterface   $cache
  * @param mixed            $config
  */
 public function __construct(AdapterInterface $adapter, CacheInterface $cache = null, $config = null)
 {
     $this->adapter = $adapter;
     $this->cache = $cache ?: new Cache\Memory();
     $this->cache->load();
     $this->config = Util::ensureConfig($config);
 }
Ejemplo n.º 2
0
 function let(AdapterInterface $adapter, CacheInterface $cache)
 {
     $this->adapter = $adapter;
     $this->cache = $cache;
     $cache->load()->shouldBeCalled();
     $this->beConstructedWith($adapter, $cache);
 }