Merge "Remove inadequate render-blocking styles for jquery.tablesorter"
[lhc/web/wiklou.git] / tests / phpunit / MediaWikiTestCase.php
index b6c569c..4140c23 100644 (file)
@@ -1387,8 +1387,10 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
        /**
         * @throws LogicException if the given database connection is not a set up to use
         * mock tables.
+        *
+        * @since 1.31 this is no longer private.
         */
-       private function ensureMockDatabaseConnection( IDatabase $db ) {
+       protected function ensureMockDatabaseConnection( IDatabase $db ) {
                if ( $db->tablePrefix() !== $this->dbPrefix() ) {
                        throw new LogicException(
                                'Trying to delete mock tables, but table prefix does not indicate a mock database.'
@@ -1538,7 +1540,7 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
                        if ( $tbl === 'page' ) {
                                // Forget about the pages since they don't
                                // exist in the DB.
-                               LinkCache::singleton()->clear();
+                               MediaWikiServices::getInstance()->getLinkCache()->clear();
                        }
                }
        }
@@ -1655,7 +1657,7 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
                                if ( $tbl === 'page' ) {
                                        // Forget about the pages since they don't
                                        // exist in the DB.
-                                       LinkCache::singleton()->clear();
+                                       MediaWikiServices::getInstance()->getLinkCache()->clear();
                                }
                        }