/** * test template deletion * @covers CacheManager::clearTemplate */ public function testClearTemplates() { $this->assertTrue(is_dir($this->cacheDir . DIRECTORY_SEPARATOR . 'twig')); $this->assertTrue(file_exists($this->cacheDir . DIRECTORY_SEPARATOR . 'templates.php')); $this->cache_manager->clearTemplates(); $this->assertFalse(is_dir($this->cacheDir . DIRECTORY_SEPARATOR . 'twig')); $this->assertFalse(file_exists($this->cacheDir . DIRECTORY_SEPARATOR . 'templates.php')); }
/** * clear all caches * @param Request $request * @return RedirectResponse */ public function allAction(Request $request) { $this->cacheManager->clearAll(); return $this->flashResponse($request, 'all', true); }