Merge "Fix exception when viewing special pages with relative related titles"
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / ProcessCacheLRUTest.php
index c8940e5..8e91e70 100644 (file)
@@ -1,8 +1,6 @@
 <?php
 
 /**
- * Test for ProcessCacheLRU class.
- *
  * Note that it uses the ProcessCacheLRUTestable class which extends some
  * properties and methods visibility. That class is defined at the end of the
  * file containing this class.
@@ -18,7 +16,7 @@ class ProcessCacheLRUTest extends PHPUnit\Framework\TestCase {
         * Compare against an array so we get the cache content difference.
         */
        protected function assertCacheEmpty( $cache, $msg = 'Cache should be empty' ) {
-               $this->assertAttributeEquals( [], 'cache', $cache, $msg );
+               $this->assertEquals( 0, $cache->getEntriesCount(), $msg );
        }
 
        /**
@@ -256,13 +254,11 @@ class ProcessCacheLRUTest extends PHPUnit\Framework\TestCase {
  * Overrides some ProcessCacheLRU methods and properties accessibility.
  */
 class ProcessCacheLRUTestable extends ProcessCacheLRU {
-       public $cache = [];
-
        public function getCache() {
-               return $this->cache;
+               return $this->cache->toArray();
        }
 
        public function getEntriesCount() {
-               return count( $this->cache );
+               return count( $this->cache->toArray() );
        }
 }