/** * @param string $filepath * @param string $format * @return mixed */ public function getAllVersions($filepath, $format = 'json') { $cacheFile = "all-versions.{$format}"; if (($cache = $this->cacheManager->getCache($filepath, $cacheFile)) !== false) { return $cache; } $this->initializeDriver($format); $this->driver->convert($filepath); $content = $this->driver->getAllVersions(); $this->cacheManager->generateCache($filepath, $cacheFile, $content); return $content; }
public function testGetCacheWithUncachedFile() { $this->assertFalse($this->cacheManager->getCache(dirname(__DIR__) . '/fixtures/false-changelog.md', 'test-false-changelog.json')); }