public function testDruponyCacheClear() { $drupony = new Drupony(drupony_get_cache_dir('container'), Drupony::CACHE_FULL, __FUNCTION__); $this->assertFileNotExists($drupony->getCacheFilePath()); $drupony->getContainer(); $this->assertFileExists($drupony->getCacheFilePath()); drupony_clear_cache('container'); $this->assertFileNotExists($drupony->getCacheFilePath()); $this->assertFileExists(static::$cacheDir); $drupony = new Drupony(drupony_get_cache_dir('container'), Drupony::CACHE_FULL, __FUNCTION__); $drupony->getContainer(); $this->assertFileExists($drupony->getCacheFilePath()); drupony_flush_caches(); $this->assertFileNotExists($drupony->getCacheFilePath()); $this->assertFileExists(static::$cacheDir); }
protected function getAllSourceFiles(Drupony $drupony) { $files = unserialize(file_get_contents($drupony->getCacheFilePath() . '.meta')); return $files; }