Merge "WebRequest: Optimise WebRequest::getPathInfo()"
[lhc/web/wiklou.git] / tests / phpunit / includes / site / DBSiteStoreTest.php
index 7c16f6c..14ee15b 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 /**
- * Tests for the DBSiteStore class.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -37,7 +37,8 @@ class DBSiteStoreTest extends MediaWikiTestCase {
        private function newDBSiteStore() {
                // NOTE: Use the real DB load balancer for now. Eventually, the test framework should
                // provide a LoadBalancer that is safe to use in unit tests.
-               return new DBSiteStore( wfGetLB() );
+               $lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
+               return new DBSiteStore( $lb );
        }
 
        /**