/** * Create the locale-service * * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator * @return \Zork\Cache\CacheManager */ public function createService(ServiceLocatorInterface $serviceLocator) { // Configure the locale $config = $serviceLocator->get('Configuration'); $srvConfig = isset($config['cache']) ? $config['cache'] : array(); return CacheManager::factory($srvConfig); }
/** * Test AbstractCacheStorage */ public function testAbstractCacheStorage() { $manager = CacheManager::factory(array('storage' => array('adapter' => array('name' => 'memory')))); $abstractStorage = $this->getMockBuilder('Zork\\Cache\\AbstractCacheStorage')->setMethods(null)->setConstructorArgs(array($manager))->getMock(); $this->assertInstanceOf('Zend\\Cache\\Storage\\StorageInterface', $abstractStorage->getCacheStorage()); }