/** * Init */ protected function setUp() { $this->testable = new FactoryBackend(); $factory = new FactoryFrontend(); $this->frontendAdapter = $factory->getAdapter('Data', []); }
/** * @expectedException \Exception * @expectedExceptionMessage Class "Phalcon\Cache\Frontend\Fake" is not exists */ public function testGetAdapterFake() { $this->testable->getAdapter('Fake', []); }
/** * Get cache adapter frontend * * @return FrontendInterface */ protected function getCacheAdapterFrontend() { /* @var Config $cacheConfig */ $cacheConfig = $this->config->cache->frontend; return $this->frontendFactory->getAdapter($cacheConfig->adapter, $cacheConfig->toArray()); }