public function testConfigureFactory() { $config = ['cache' => ['defaults' => ['adapter' => 'foo', 'options' => ['enabled' => false]], 'adapters' => ['foo' => ['class' => FileCache::CLASS, 'options' => ['basedir' => 'bar', 'hashing_algorithm' => 'crc32']]]]]; $systemConfig = new SystemConfig($config); $listener = new ConfigureCacheListener(); $listener->setConfig($systemConfig); $listener->configureFactory(new SystemEvent()); $this->assertSame($config['cache'], CacheFactory::getConfig()); }
public function testGetConfig() { $config = ['adapters' => ['filesystem' => ['class' => 'Es\\Cache\\Adapter\\FileCache']]]; CacheFactory::setConfig($config); $this->assertSame($config, CacheFactory::getConfig()); }