objectcache: defined some missing methods in MultiWriteBagOStuff
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / objectcache / BagOStuffTest.php
index 3d8c9cb..b68f150 100644 (file)
@@ -98,7 +98,13 @@ class BagOStuffTest extends MediaWikiTestCase {
                        $this->cache->merge( $key, $callback, 5, 1 ),
                        'Non-blocking merge (CAS)'
                );
-               $this->assertEquals( 1, $calls );
+               if ( $this->cache instanceof MultiWriteBagOStuff ) {
+                       $wrapper = \Wikimedia\TestingAccessWrapper::newFromObject( $this->cache );
+                       $n = count( $wrapper->caches );
+               } else {
+                       $n = 1;
+               }
+               $this->assertEquals( $n, $calls );
        }
 
        /**