protected static function checkFunctionWhitelistUpdate() { $cached = Cache::getTmpFunctionWhitelist(); $current = FunctionPatcher::getFunctionWhitelist(); // Updated? if ($cached !== $current) { MonkeyPatchManager::log('clear_src_cache: from ' . __METHOD__); Cache::clearSrcCache(); Cache::writeTmpFunctionWhitelist($current); } }
public function test_clearSrcCache() { Cache::clearSrcCache(); $this->assertFalse(file_exists(ReflectionHelper::getPrivateProperty(__NAMESPACE__ . '\\Cache', 'src_cache_dir'))); }