Fix casing of class and function name usages

Bug: T253628
Change-Id: I5c64f436d3cf757390b751ce3e34bfc7872bc176
This commit is contained in:
Reedy 2022-12-04 19:09:28 +00:00
parent a601e906b6
commit 0cb2c3c106
38 changed files with 60 additions and 60 deletions

View file

@ -2960,7 +2960,7 @@ class EditPage implements IEditObject {
}
if ( !$userExists && !$ip ) {
$out->addHtml( Html::warningBox(
$out->addHTML( Html::warningBox(
$out->msg( 'userpage-userdoesnotexist', wfEscapeWikiText( $username ) )->parse(),
'mw-userpage-userdoesnotexist'
) );
@ -3504,14 +3504,14 @@ class EditPage implements IEditObject {
// Let sysop know that this will make private content public if saved
if ( !$revRecord->userCan( RevisionRecord::DELETED_TEXT, $user ) ) {
$out->addHtml(
$out->addHTML(
Html::warningBox(
$out->msg( 'rev-deleted-text-permission', $this->mTitle->getPrefixedDBkey() )->parse(),
'plainlinks'
)
);
} elseif ( $revRecord->isDeleted( RevisionRecord::DELETED_TEXT ) ) {
$out->addHtml(
$out->addHTML(
Html::warningBox(
// title used in wikilinks, should not contain whitespaces
$out->msg( 'rev-deleted-text-view', $this->mTitle->getPrefixedDBkey() )->parse(),

View file

@ -530,7 +530,7 @@ class MediaWiki {
// Also unconditionally cache page views.
if ( $this->config->get( MainConfigNames::UseCdn ) ) {
$htmlCacheUpdater = $services->getHtmlCacheUpdater();
if ( $request->matchUrlForCdn( $htmlCacheUpdater->getUrls( $requestTitle ) ) ) {
if ( $request->matchURLForCDN( $htmlCacheUpdater->getUrls( $requestTitle ) ) ) {
$output->setCdnMaxage( $this->config->get( MainConfigNames::CdnMaxAge ) );
} elseif ( $action instanceof ViewAction ) {
$output->setCdnMaxage( 3600 );

View file

@ -830,7 +830,7 @@ class MovePage {
private function moveToInternal( UserIdentity $user, &$nt, $reason = '', $createRedirect = true,
array $changeTags = []
): Status {
if ( $nt->getArticleId( Title::READ_LATEST ) ) {
if ( $nt->getArticleID( Title::READ_LATEST ) ) {
$moveOverRedirect = true;
$logType = 'move_redir';
} else {

View file

@ -76,7 +76,7 @@ class SqlModuleDependencyStore extends DependencyStore {
return;
}
$dbw = $this->getPrimaryDB();
$dbw = $this->getPrimaryDb();
$depsBlobByEntity = $this->fetchDependencyBlobs( array_keys( $dataByEntity ), $dbw );
$rows = [];
@ -124,7 +124,7 @@ class SqlModuleDependencyStore extends DependencyStore {
return;
}
$dbw = $this->getPrimaryDB();
$dbw = $this->getPrimaryDb();
$disjunctionConds = [];
foreach ( (array)$entities as $entity ) {
[ $module, $variant ] = $this->getEntityNameComponents( $entity );

View file

@ -69,7 +69,7 @@ abstract class AbstractContributionHandler extends Handler {
/** @var UserIdentity $user */
$user = $this->getValidatedParams()['user'];
$name = $user->getName();
if ( !$this->userNameUtils->isIp( $name ) && !$user->isRegistered() ) {
if ( !$this->userNameUtils->isIP( $name ) && !$user->isRegistered() ) {
throw new LocalizedHttpException(
new MessageValue( 'rest-nonexistent-user', [ $name ] ), 404
);

View file

@ -293,7 +293,7 @@ class DeleteAction extends FormlessAction {
private function showBacklinksWarning(): void {
$backlinkCache = $this->backlinkCacheFactory->getBacklinkCache( $this->getTitle() );
if ( $backlinkCache->hasLinks( 'pagelinks' ) || $backlinkCache->hasLinks( 'templatelinks' ) ) {
$this->getOutput()->addHtml(
$this->getOutput()->addHTML(
Html::warningBox(
$this->msg( 'deleting-backlinks-warning' )->parse(),
'plainlinks'
@ -306,7 +306,7 @@ class DeleteAction extends FormlessAction {
$title = $this->getTitle();
$subpageCount = count( $title->getSubpages( 51 ) );
if ( $subpageCount ) {
$this->getOutput()->addHtml(
$this->getOutput()->addHTML(
Html::warningBox(
$this->msg( 'deleting-subpages-warning' )->numParams( $subpageCount )->parse(),
'plainlinks'
@ -318,7 +318,7 @@ class DeleteAction extends FormlessAction {
$talkPageTitle = $this->titleFactory->newFromLinkTarget( $this->namespaceInfo->getTalkPage( $title ) );
$subpageCount = count( $talkPageTitle->getSubpages( 51 ) );
if ( $subpageCount ) {
$this->getOutput()->addHtml(
$this->getOutput()->addHTML(
Html::warningBox(
$this->msg( 'deleting-talkpage-subpages-warning' )->numParams( $subpageCount )->parse(),
'plainlinks'

View file

@ -54,7 +54,7 @@ class LogstashFormatter extends \Monolog\Formatter\LogstashFormatter {
public function format( array $record ): string {
$record = \Monolog\Formatter\NormalizerFormatter::format( $record );
if ( $this->version === self::V1 ) {
$message = $this->formatv1( $record );
$message = $this->formatV1( $record );
} elseif ( $this->version === self::V0 ) {
$message = $this->formatV0( $record );
} else {

View file

@ -832,7 +832,7 @@ class DifferenceEngine extends ContextSource {
$this->getTitle()->getFullURL( $query )
];
}
$out->addHtml( Html::warningBox( $this->msg( ...$msg )->parse(), 'plainlinks' ) );
$out->addHTML( Html::warningBox( $this->msg( ...$msg )->parse(), 'plainlinks' ) );
# Otherwise, output a regular diff...
} else {
# Add deletion notice if the user is viewing deleted content

View file

@ -63,7 +63,7 @@ class SimpleParsoidOutputStash implements ParsoidOutputStash {
*
* @return SelserContext|null
*/
public function get( ParsoidRenderId $renderId ): ?SelserContext {
public function get( ParsoidRenderID $renderId ): ?SelserContext {
$key = $this->makeCacheKey( $renderId );
$jsonic = $this->bagOfStuff->get( $key ) ?? [];

View file

@ -2175,7 +2175,7 @@ class Language {
->getUser()
->getDatePreference();
} else {
$userOptionsLookup = MediawikiServices::getInstance()->getUserOptionsLookup();
$userOptionsLookup = MediaWikiServices::getInstance()->getUserOptionsLookup();
$datePreference = (string)$userOptionsLookup->getDefaultOption( 'date' );
}
} else {

View file

@ -1358,7 +1358,7 @@ class Article implements Page {
}
if ( !( $user && $user->isRegistered() ) && !$ip ) { # User does not exist
$outputPage->addHtml( Html::warningBox(
$outputPage->addHTML( Html::warningBox(
$context->msg( 'userpage-userdoesnotexist-view', wfEscapeWikiText( $rootPart ) )->parse(),
'mw-userpage-userdoesnotexist'
) );
@ -1518,7 +1518,7 @@ class Article implements Page {
RevisionRecord::DELETED_TEXT,
$this->getContext()->getAuthority()
) ) {
$outputPage->addHtml(
$outputPage->addHTML(
Html::warningBox(
$outputPage->msg( 'rev-deleted-text-permission', $titleText )->parse(),
'plainlinks'
@ -1533,7 +1533,7 @@ class Article implements Page {
$link = $this->getTitle()->getFullURL( "oldid={$oldid}&unhide=1" );
$msg = $this->mRevisionRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED ) ?
'rev-suppressed-text-unhide' : 'rev-deleted-text-unhide';
$outputPage->addHtml(
$outputPage->addHTML(
Html::warningBox(
$outputPage->msg( $msg, $link )->parse(),
'plainlinks'
@ -1546,7 +1546,7 @@ class Article implements Page {
$msg = $this->mRevisionRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED )
? [ 'rev-suppressed-text-view', $titleText ]
: [ 'rev-deleted-text-view', $titleText ];
$outputPage->addHtml(
$outputPage->addHTML(
Html::warningBox(
$outputPage->msg( $msg[0], $msg[1] )->parse(),
'plainlinks'

View file

@ -441,7 +441,7 @@ class FullSearchResultWidget implements SearchResultWidget {
}
$path = MW_INSTALL_PATH . '/resources/lib/ooui/themes/wikimediaui/images/icons/imageLayoutFrameless.svg';
$this->thumbnailPlaceholderHtml = HTML::rawElement(
$this->thumbnailPlaceholderHtml = Html::rawElement(
'div',
[ 'class' => 'searchResultImage-thumbnail-placeholder' ],
file_get_contents( $path )

View file

@ -221,7 +221,7 @@ class SessionManager implements SessionManagerInterface {
$this->logger->debug( 'SessionManager using store ' . get_class( $store ) );
$this->store = $store instanceof CachedBagOStuff ? $store : new CachedBagOStuff( $store );
$this->userNameUtils = MediawikiServices::getInstance()->getUserNameUtils();
$this->userNameUtils = MediaWikiServices::getInstance()->getUserNameUtils();
register_shutdown_function( [ $this, 'shutdown' ] );
}

View file

@ -100,7 +100,7 @@ class SkinMustache extends SkinTemplate {
'html-user-language-attributes' => $this->prepareUserLanguageAttributes(),
// links
'link-mainpage' => Title::newMainPage()->getLocalUrl(),
'link-mainpage' => Title::newMainPage()->getLocalURL(),
];
foreach ( $this->options['messages'] ?? [] as $message ) {

View file

@ -1455,7 +1455,7 @@ class SkinTemplate extends Skin {
}
$specialAssociatedNavigationLinks['special-specialAssociatedNavigationLinks-link-' . strval( $i ) ] = [
'text' => $text,
'href' => $relatedTitle->getLocalUrl(),
'href' => $relatedTitle->getLocalURL(),
'class' => $relatedTitle->equals( $title ) ? 'selected' : '',
];
}

View file

@ -262,7 +262,7 @@ class SpecialChangeCredentials extends AuthManagerSpecialPage {
$out->redirect( $returnUrl );
} else {
// messages used: changecredentials-success removecredentials-success
$out->addHtml(
$out->addHTML(
Html::successBox(
$out->msg( static::$messagePrefix . '-success' )->parse()
)

View file

@ -421,7 +421,7 @@ class SpecialContributions extends IncludableSpecialPage {
if ( !$this->userNameUtils->isIP( $userObj->getName() )
&& !IPUtils::isValidRange( $userObj->getName() )
) {
$this->getOutput()->addHtml( Html::warningBox(
$this->getOutput()->addHTML( Html::warningBox(
$this->getOutput()->msg( 'contributions-userdoesnotexist',
wfEscapeWikiText( $userObj->getName() ) )->parse(),
'mw-userpage-userdoesnotexist'

View file

@ -548,7 +548,7 @@ class SpecialSearch extends SpecialPage {
$this->getHookRunner()->onSpecialSearchResults( $term, $titleMatches, $textMatches );
// Close <div class='mw-search-results-info'>
$out->addHtml( '</div>' );
$out->addHTML( '</div>' );
// Although $num might be 0 there can still be secondary or inline
// results to display.

View file

@ -550,7 +550,7 @@ class SpecialUndelete extends SpecialPage {
$msg = $revRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED )
? [ 'rev-suppressed-text-permission', $titleText ]
: [ 'rev-deleted-text-permission', $titleText ];
$out->addHtml(
$out->addHTML(
Html::warningBox(
$this->msg( $msg[0], $msg[1] )->parse(),
'plainlinks'
@ -562,7 +562,7 @@ class SpecialUndelete extends SpecialPage {
$msg = $revRecord->isDeleted( RevisionRecord::DELETED_RESTRICTED )
? [ 'rev-suppressed-text-view', $titleText ]
: [ 'rev-deleted-text-view', $titleText ];
$out->addHtml(
$out->addHTML(
Html::warningBox(
$this->msg( $msg[0], $msg[1] )->parse(),
'plainlinks'

View file

@ -150,7 +150,7 @@ class ImageListPager extends TablePager {
* @param string $userName Unescaped user name
*/
protected function outputUserDoesNotExist( $userName ) {
$this->getOutput()->addHtml( Html::warningBox(
$this->getOutput()->addHTML( Html::warningBox(
$this->getOutput()->msg( 'listfiles-userdoesnotexist', wfEscapeWikiText( $userName ) )->parse(),
'mw-userpage-userdoesnotexist'
) );

View file

@ -344,7 +344,7 @@ class UploadFromUrl extends UploadBase {
wfDebugLog( 'fileupload', 'Download by URL completed successfully.' );
} else {
// @phan-suppress-next-line PhanPossiblyUndeclaredVariable Always set after loop
wfDebugLog( 'fileupload', $status->getWikitext( false, false, 'en' ) );
wfDebugLog( 'fileupload', $status->getWikiText( false, false, 'en' ) );
wfDebugLog(
'fileupload',
// @phan-suppress-next-line PhanPossiblyUndeclaredVariable Always set after loop

View file

@ -126,7 +126,7 @@ class TalkPageNotificationManager {
// Abort if the hook says so. (Echo doesn't abort, it just queues its own update)
if ( !$this->hookRunner->onUserClearNewTalkNotification(
$user,
$oldRev ? $oldRev->getID() : 0
$oldRev ? $oldRev->getId() : 0
) ) {
return;
}

View file

@ -40,7 +40,7 @@ class CheckComposerLockUpToDate extends Maintenance {
$installed = $lock->getInstalledDependencies();
foreach ( $json->getRequiredDependencies() as $name => $version ) {
if ( isset( $installed[$name] ) ) {
if ( !SemVer::satisfies( $installed[$name]['version'], $version ) ) {
if ( !Semver::satisfies( $installed[$name]['version'], $version ) ) {
$this->output(
"$name: {$installed[$name]['version']} installed, $version required.\n"
);

View file

@ -287,7 +287,7 @@ class UpdateMediaWiki extends Maintenance {
}
$status = $settings->validate();
if ( !$status->isOk() ) {
if ( !$status->isOK() ) {
foreach ( $status->getErrorsByType( 'error' ) as $msg ) {
$msg = wfMessage( $msg['message'], ...$msg['params'] );
$warnings[] = $msg->text();

View file

@ -157,7 +157,7 @@ class EditPageConstraintsTest extends MediaWikiLangTestCase {
$this->getExistingTestPage( 'AccidentalRecreationConstraintPage' );
// And now delete it, so that there is a deletion log
$page = $this->getNonExistingTestPage( 'AccidentalRecreationConstraintPage' );
$page = $this->getNonexistingTestPage( 'AccidentalRecreationConstraintPage' );
$title = $page->getTitle();
// Set the time of the deletion to be a specific time, so we can be sure to start the
@ -169,7 +169,7 @@ class EditPageConstraintsTest extends MediaWikiLangTestCase {
[ 'log_timestamp' => $dbw->timestamp( '20200101000000' ) ],
[
'log_namespace' => $title->getNamespace(),
'log_title' => $title->getDBKey(),
'log_title' => $title->getDBkey(),
'log_type' => 'delete',
'log_action' => 'delete'
],

View file

@ -910,7 +910,7 @@ class MessageTest extends MediaWikiLangTestCase {
$this->assertSame( '(<a>foo</a>)', $msg->parse() );
$title = TestingAccessWrapper::newFromObject( $msg )->contextPage;
$this->assertInstanceOf( PageReference::class, $title );
$this->assertSame( 'Testing', $title->getDbKey() );
$this->assertSame( 'Testing', $title->getDBkey() );
$msg = new Message( 'mainpage' );
$msg->inLanguage( 'de' );

View file

@ -2885,12 +2885,12 @@ class RevisionStoreDbTest extends MediaWikiIntegrationTestCase {
[ $pageTitle, $pageIdentity ] = $getPageIdentity();
$editStatus = $this->editPage( $pageTitle->getPrefixedDBkey(), 'First Revision' );
$this->assertStatusGood( $editStatus, 'must create first revision' );
$firstRevId = $editStatus->getNewRevision()->getID();
$firstRevId = $editStatus->getNewRevision()->getId();
$editStatus = $this->editPage( $pageTitle->getPrefixedText(), 'New Revision' );
$this->assertStatusGood( $editStatus, 'must create new revision' );
$this->assertNotSame(
$firstRevId,
$editStatus->getNewRevision()->getID(),
$editStatus->getNewRevision()->getId(),
'new revision must have different id'
);
$this->assertSame(

View file

@ -757,7 +757,7 @@ class TitleTest extends MediaWikiIntegrationTestCase {
'',
__METHOD__
);
$res = Title::newFromId( $maxPageId + 1 );
$res = Title::newFromID( $maxPageId + 1 );
$this->assertNull( $res, 'newFromID returns null for missing ids' );
}

View file

@ -645,6 +645,6 @@ class ContentHandlerTest extends MediaWikiIntegrationTestCase {
$validateParams = new ValidationParams( $page, 0 );
$status = $contentHandler->validateSave( $content, $validateParams );
$this->assertEquals( $expectedResult, $status->isOk() );
$this->assertEquals( $expectedResult, $status->isOK() );
}
}

View file

@ -346,7 +346,7 @@ class DifferenceEngineTest extends MediaWikiIntegrationTestCase {
$this->context->setConfig( $config );
}
$page = $this->getNonExistingTestPage( 'Page1' );
$page = $this->getNonexistingTestPage( 'Page1' );
$this->assertTrue( $this->editPage( $page, 'Edit1' )->isGood(), 'edited a page' );
$rev1 = $page->getRevisionRecord();
$this->assertTrue( $this->editPage( $page, 'Edit2' )->isGood(), 'edited a page' );

View file

@ -21,7 +21,7 @@ class UserEditCountInitJobTest extends MediaWikiIntegrationTestCase {
$user = $this->getMutableTestUser()->getUser();
if ( $startingEditCount !== false ) {
$this->getServiceContainer()->getDbLoadBalancer()
$this->getServiceContainer()->getDBLoadBalancer()
->getConnectionRef( DB_PRIMARY )
->update(
'user',

View file

@ -280,7 +280,7 @@ EOF;
// REMOVE THIS ONCE Parser::TOC_START IS REMOVED
public static function provideGetTextBackCompat() {
$toc = self::provideGetTextToc();
$toc = self::provideGetTextToC();
$text = <<<EOF
<p>Test document.
</p>
@ -386,7 +386,7 @@ EOF
// REMOVE THIS ONCE ParserCache is transitioned to <meta> placeholder
public static function provideGetTextBackCompat2() {
// phpcs:disable Generic.Files.LineLength
$toc = self::provideGetTextToc();
$toc = self::provideGetTextToC();
$text = <<<EOF
<p>Test document.
</p>
@ -490,7 +490,7 @@ EOF
}
public static function provideGetText() {
$toc = self::provideGetTextToc();
$toc = self::provideGetTextToC();
$text = <<<EOF
<p>Test document.
</p>

View file

@ -86,11 +86,11 @@ class ImmutableSessionProviderWithCookieTest extends MediaWikiIntegrationTestCas
public function testBasics() {
$provider = $this->getProvider( null );
$this->assertFalse( $provider->persistsSessionID() );
$this->assertFalse( $provider->persistsSessionId() );
$this->assertFalse( $provider->canChangeUser() );
$provider = $this->getProvider( 'Foo' );
$this->assertTrue( $provider->persistsSessionID() );
$this->assertTrue( $provider->persistsSessionId() );
$this->assertFalse( $provider->canChangeUser() );
$msg = $provider->whyNoSession();

View file

@ -462,7 +462,7 @@ class WatchedItemStoreUnitTest extends MediaWikiIntegrationTestCase {
}
public function provideTestPageFactoryAndIntWithDbUnsafeVersion() {
foreach ( $this->provideIntWithDBUnsafeVersion() as $dbint ) {
foreach ( $this->provideIntWithDbUnsafeVersion() as $dbint ) {
foreach ( $this->provideTestPageFactory() as $testPageFactory ) {
yield [ $dbint[0], $testPageFactory[0] ];
}

View file

@ -263,7 +263,7 @@ class EditResultBuilderDbTest extends MediaWikiIntegrationTestCase {
// test the newest reverted revision
$newestRevertedRev = $this->revisionStore->getRevisionById(
$er->getnewestRevertedRevisionId()
$er->getNewestRevertedRevisionId()
);
$expectedNewestRevertedRev = $this->revisions[$expectedNewestRevertedRevKey];
$this->assertSame(

View file

@ -142,7 +142,7 @@ class DatabaseBlockStoreTest extends MediaWikiIntegrationTestCase {
$this->assertArrayHasKey( 'autoIds', $result );
$this->assertCount( 0, $result['autoIds'] );
$retrievedBlock = DatabaseBlock::newFromId( $result['id'] );
$retrievedBlock = DatabaseBlock::newFromID( $result['id'] );
$this->assertTrue( $block->equals( $retrievedBlock ) );
}
@ -247,7 +247,7 @@ class DatabaseBlockStoreTest extends MediaWikiIntegrationTestCase {
$this->assertArrayHasKey( 'autoIds', $result );
$this->assertCount( 1, $result['autoIds'] );
$retrievedBlock = DatabaseBlock::newFromId( $result['autoIds'][0] );
$retrievedBlock = DatabaseBlock::newFromID( $result['autoIds'][0] );
$this->assertSame( $block->getId(), $retrievedBlock->getParentBlockId() );
$this->assertAutoblockEqualsBlock( $block, $retrievedBlock );
}
@ -269,8 +269,8 @@ class DatabaseBlockStoreTest extends MediaWikiIntegrationTestCase {
$store = $this->getStore();
$result = $store->updateBlock( $existingBlock );
$updatedBlock = DatabaseBlock::newFromId( $result['id'] );
$autoblock = DatabaseBlock::newFromId( $result['autoIds'][0] );
$updatedBlock = DatabaseBlock::newFromID( $result['id'] );
$autoblock = DatabaseBlock::newFromID( $result['autoIds'][0] );
$this->assertTrue( $updatedBlock->equals( $existingBlock ) );
$this->assertAutoblockEqualsBlock( $existingBlock, $autoblock );
@ -284,7 +284,7 @@ class DatabaseBlockStoreTest extends MediaWikiIntegrationTestCase {
$store = $this->getStore();
$result = $store->updateBlock( $existingBlock );
$updatedBlock = DatabaseBlock::newFromId( $result['id'] );
$updatedBlock = DatabaseBlock::newFromID( $result['id'] );
$this->assertTrue( $updatedBlock->equals( $existingBlock ) );
$this->assertCount( 0, $result['autoIds'] );
@ -295,8 +295,8 @@ class DatabaseBlockStoreTest extends MediaWikiIntegrationTestCase {
$existingBlock->isAutoblocking( true );
$result = $store->updateBlock( $existingBlock );
$updatedBlock = DatabaseBlock::newFromId( $result['id'] );
$autoblock = DatabaseBlock::newFromId( $result['autoIds'][0] );
$updatedBlock = DatabaseBlock::newFromID( $result['id'] );
$autoblock = DatabaseBlock::newFromID( $result['autoIds'][0] );
$this->assertTrue( $updatedBlock->equals( $existingBlock ) );
$this->assertAutoblockEqualsBlock( $existingBlock, $autoblock );
@ -316,7 +316,7 @@ class DatabaseBlockStoreTest extends MediaWikiIntegrationTestCase {
$store = $this->getStore();
$result = $store->updateBlock( $existingBlock );
$retrievedBlock = DatabaseBlock::newFromId( $result['id'] );
$retrievedBlock = DatabaseBlock::newFromID( $result['id'] );
$this->assertCount(
$expectedCount,
$retrievedBlock->getRestrictions()

View file

@ -485,7 +485,7 @@ trait DummyServicesTrait {
$dataKey = $this->getWatchedItemStoreKey( $user, $target );
return isset( $this->watchedItemStoreData[ $dataKey ] );
} );
$mock->method( 'isTempWatched' )->willreturnCallback( function ( $user, $target ) {
$mock->method( 'isTempWatched' )->willReturnCallback( function ( $user, $target ) {
$dataKey = $this->getWatchedItemStoreKey( $user, $target );
return isset( $this->watchedItemStoreData[ $dataKey ] ) &&
$this->watchedItemStoreData[ $dataKey ] !== true;

View file

@ -53,7 +53,7 @@ class TitleValueTest extends \MediaWikiUnitTestCase {
$this->assertEquals( $ns, $title->getNamespace() );
$this->assertTrue( $title->inNamespace( $ns ) );
$this->assertEquals( strtr( $text, ' ', '_' ), $title->getDBKey() );
$this->assertEquals( strtr( $text, ' ', '_' ), $title->getDBkey() );
$this->assertEquals( strtr( $text, '_', ' ' ), $title->getText() );
$this->assertEquals( $fragment, $title->getFragment() );
$this->assertEquals( $hasFragment, $title->hasFragment() );
@ -71,7 +71,7 @@ class TitleValueTest extends \MediaWikiUnitTestCase {
$this->assertEquals( $ns, $title->getNamespace() );
$this->assertTrue( $title->inNamespace( $ns ) );
$this->assertEquals( strtr( $text, ' ', '_' ), $title->getDBKey() );
$this->assertEquals( strtr( $text, ' ', '_' ), $title->getDBkey() );
$this->assertEquals( strtr( $text, '_', ' ' ), $title->getText() );
$this->assertEquals( $fragment, $title->getFragment() );
$this->assertEquals( $hasFragment, $title->hasFragment() );