Use MainConfigNames constants in tests where possible

I believe this makes the code less brittle, and also makes it a bit
more obvious what these strings are meant to represent.

Change-Id: I0c5cdaa0b94b525ad3e65278ca9bf088f480df40
This commit is contained in:
thiemowmde 2024-07-10 12:44:02 +02:00
parent e22dc3c08b
commit 4d8ec5ebc5
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,7 @@ use Cite\ErrorReporter;
use Cite\ReferenceListFormatter;
use Cite\ReferenceStack;
use Language;
use MediaWiki\MainConfigNames;
use MediaWiki\Parser\Parser;
use ParserOptions;
use Wikimedia\TestingAccessWrapper;
@ -19,7 +20,7 @@ class CiteIntegrationTest extends \MediaWikiIntegrationTestCase {
protected function setUp(): void {
parent::setUp();
$this->overrideConfigValue( 'LanguageCode', 'qqx' );
$this->overrideConfigValue( MainConfigNames::LanguageCode, 'qqx' );
}
/**

View file

@ -3,6 +3,7 @@
namespace Cite\Tests\Integration;
use Cite\AnchorFormatter;
use MediaWiki\MainConfigNames;
use MediaWiki\Parser\Sanitizer;
use Wikimedia\TestingAccessWrapper;
@ -14,7 +15,7 @@ class AnchorFormatterTest extends \MediaWikiIntegrationTestCase {
protected function setUp(): void {
parent::setUp();
$this->overrideConfigValue( 'FragmentMode', [ 'html5' ] );
$this->overrideConfigValue( MainConfigNames::FragmentMode, [ 'html5' ] );
}
public function testRefKey() {