Fix caller name in DatabasePostgresTest
[lhc/web/wiklou.git] / tests / phpunit / includes / CommentStoreTest.php
index c41361c..0c5d8e3 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\ScopedCallback;
 use Wikimedia\TestingAccessWrapper;
 
@@ -23,8 +24,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
         * @return CommentStore
         */
        protected function makeStore( $stage ) {
-               global $wgContLang;
-               $store = new CommentStore( $wgContLang, $stage );
+               $store = new CommentStore( MediaWikiServices::getInstance()->getContentLanguage(), $stage );
                return $store;
        }
 
@@ -35,6 +35,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
         * @return CommentStore
         */
        protected function makeStoreWithKey( $stage, $key ) {
+               $this->hideDeprecated( 'CommentStore::newKey' );
                $store = CommentStore::newKey( $key );
                TestingAccessWrapper::newFromObject( $store )->stage = $stage;
                return $store;
@@ -774,6 +775,7 @@ class CommentStoreTest extends MediaWikiLangTestCase {
        }
 
        public function testNewKey() {
+               $this->hideDeprecated( 'CommentStore::newKey' );
                $this->assertInstanceOf( CommentStore::class, CommentStore::newKey( 'dummy' ) );
        }