Merge "objectcache: add setMockTime() method to BagOStuff/WANObjectCache"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 1 Jun 2018 13:19:24 +0000 (13:19 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 1 Jun 2018 13:19:24 +0000 (13:19 +0000)
1  2 
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/HashBagOStuff.php
includes/libs/objectcache/WANObjectCache.php

@@@ -2057,17 -2064,9 +2060,9 @@@ class WANObjectCache implements IExpiri
        protected function determineKeyClass( $key ) {
                $parts = explode( ':', $key );
  
 -              return isset( $parts[1] ) ? $parts[1] : $parts[0]; // sanity
 +              return $parts[1] ?? $parts[0]; // sanity
        }
  
-       /**
-        * @return float UNIX timestamp
-        * @codeCoverageIgnore
-        */
-       protected function getCurrentTime() {
-               return microtime( true );
-       }
        /**
         * @param string $value Wrapped value like "PURGED:<timestamp>:<holdoff>"
         * @return array|bool Array containing a UNIX timestamp (float) and holdoff period (integer),