Localisation updates from https://translatewiki.net.
[mediawiki.git] / tests / phpunit / includes / objectcache / SqlBagOStuffServerArrayTest.php
blob99dff042efef507c6e47bb55eec7018dd1d7a3ed
1 <?php
3 use MediaWiki\MediaWikiServices;
4 use Wikimedia\TestingAccessWrapper;
6 /**
7 * @group BagOStuff
8 * @group Database
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 ) ]
19 ] );