Merge "resourceloader: Mark clearCache() as private (only for tests)"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoader.php
index 604a140..fe9ba74 100644 (file)
@@ -37,7 +37,7 @@ use Wikimedia\WrappedString;
  */
 class ResourceLoader implements LoggerAwareInterface {
        /** @var int */
-       protected static $filterCacheVersion = 8;
+       const CACHE_VERSION = 8;
 
        /** @var bool */
        protected static $debugMode = null;
@@ -199,7 +199,8 @@ class ResourceLoader implements LoggerAwareInterface {
                        'resourceloader',
                        'filter',
                        $filter,
-                       self::$filterCacheVersion, md5( $data )
+                       self::CACHE_VERSION,
+                       md5( $data )
                );
 
                $result = $cache->get( $key );
@@ -1583,6 +1584,9 @@ MESSAGE;
         * Global state and $wgRequest are evil, but we're using it right
         * now and sometimes we need to be able to force ResourceLoader to
         * re-evaluate the context because it has changed (e.g. in the test suite).
+        *
+        * @internal For use by unit tests
+        * @codeCoverageIgnore
         */
        public static function clearCache() {
                self::$debugMode = null;