%PDF- %PDF-
Direktori : /www/varak.net/wiki.varak.net/extensions/CirrusSearch/tests/unit/ |
Current File : /www/varak.net/wiki.varak.net/extensions/CirrusSearch/tests/unit/TestUtils.php |
<?php namespace CirrusSearch\Test; use MediaWiki\MediaWikiServices; class HashSearchConfig extends \CirrusSearch\SearchConfig { public function __construct( array $settings ) { $this->setSource( new \HashConfig( $settings ) ); } /** * Allow overriding Wiki ID * @return mixed|string */ public function getWikiId() { if ( $this->has( '_wikiID' ) ) { return $this->get( '_wikiID' ); } return parent::getWikiId(); } } class DummyConnection extends \CirrusSearch\Connection { public function __construct() { $this->config = MediaWikiServices::getInstance() ->getConfigFactory() ->makeConfig( 'CirrusSearch' ); } public function getServerList() { return [ 'localhost' ]; } }