<?php
+use MediaWiki\MediaWikiServices;
use Wikimedia\ScopedCallback;
use Wikimedia\TestingAccessWrapper;
* @return CommentStore
*/
protected function makeStore( $stage ) {
- global $wgContLang;
- $store = new CommentStore( $wgContLang, $stage );
+ $store = new CommentStore( MediaWikiServices::getInstance()->getContentLanguage(), $stage );
return $store;
}
* @return CommentStore
*/
protected function makeStoreWithKey( $stage, $key ) {
+ $this->hideDeprecated( 'CommentStore::newKey' );
$store = CommentStore::newKey( $key );
TestingAccessWrapper::newFromObject( $store )->stage = $stage;
return $store;
}
public function testNewKey() {
+ $this->hideDeprecated( 'CommentStore::newKey' );
$this->assertInstanceOf( CommentStore::class, CommentStore::newKey( 'dummy' ) );
}