public function test_writeTmpFunctionWhitelist() { Cache::createTmpListDir(); $list = ['file_exists', 'file_get_contents', 'file_put_contents']; Cache::writeTmpFunctionWhitelist($list); $actual = Cache::getTmpFunctionWhitelist(); $this->assertEquals($list, $actual); }
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); } }