diff options
author | Aaron Schulz <aschulz@wikimedia.org> | 2018-06-27 15:00:10 +0100 |
---|---|---|
committer | Krinkle <krinklemail@gmail.com> | 2018-06-28 20:23:37 +0000 |
commit | 6afa7bb86a38d0097f6a98238b4e9e60205ffd0a (patch) | |
tree | f57e90568a89d57ce47b6d6b4f2b6fd1ba8115d4 /tests/phpunit/includes/libs | |
parent | 42ae4a4d82632e035e341ceb27fc23b880861972 (diff) | |
download | mediawikicore-6afa7bb86a38d0097f6a98238b4e9e60205ffd0a.tar.gz mediawikicore-6afa7bb86a38d0097f6a98238b4e9e60205ffd0a.zip |
Make ProcessCacheLRU wrap MapCacheLRU
Change-Id: I190c824af471aee798e2f111b902f38532b8ac99
Diffstat (limited to 'tests/phpunit/includes/libs')
-rw-r--r-- | tests/phpunit/includes/libs/ProcessCacheLRUTest.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/phpunit/includes/libs/ProcessCacheLRUTest.php b/tests/phpunit/includes/libs/ProcessCacheLRUTest.php index c8940e5f2b0f..c9fa3205fecc 100644 --- a/tests/phpunit/includes/libs/ProcessCacheLRUTest.php +++ b/tests/phpunit/includes/libs/ProcessCacheLRUTest.php @@ -18,7 +18,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 +256,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() ); } } |