3 use MediaWiki\MediaWikiServices
;
4 use Wikimedia\TestingAccessWrapper
;
9 * @covers \SqlBagOStuff
11 class SqlBagOStuffServerArrayTest
extends BagOStuffTestBase
{
12 protected function newCacheInstance() {
13 // Extract server config from main load balancer
14 $lb = MediaWikiServices
::getInstance()->getDBLoadBalancer();
15 $serverInfo = TestingAccessWrapper
::newFromObject( $lb )->serverInfo
;
16 return $this->getServiceContainer()->getObjectCacheFactory()->newFromParams( [
17 'class' => SqlBagOStuff
::class,
18 'servers' => [ $serverInfo->getServerInfo( 0 ) ]