Fix a plethora of class and function call case mismatches

Bug: T231412
Change-Id: I597a25de3294a6673424f30475760280ef209a8a
This commit is contained in:
Reedy 2020-05-26 14:14:46 +01:00
parent 111ae6400d
commit 229b2c15e8
34 changed files with 70 additions and 70 deletions

View file

@ -2313,7 +2313,7 @@ ERROR;
} elseif ( $this->section == ''
&& $this->edittime
&& $this->revisionStore->userWasLastToEdit(
wfGetDb( DB_MASTER ),
wfGetDB( DB_MASTER ),
$this->mTitle->getArticleID(),
$user->getId(),
$this->edittime

View file

@ -92,7 +92,7 @@ abstract class LatestPageContentHandler extends SimpleHandler {
): array {
return [
'id' => $titleObject->getArticleID(),
'key' => $this->titleFormatter->getPrefixedDbKey( $titleObject ),
'key' => $this->titleFormatter->getPrefixedDBkey( $titleObject ),
'title' => $this->titleFormatter->getPrefixedText( $titleObject ),
'latest' => [
'id' => $revision->getId(),

View file

@ -94,7 +94,7 @@ class PageSourceHandler extends LatestPageContentHandler {
*/
protected function getETag(): string {
$revision = $this->getLatestRevision();
$latestRevision = $revision ? $revision->getID() : 'e0';
$latestRevision = $revision ? $revision->getId() : 'e0';
$isAccessible = $this->isAccessible( $this->getTitle() );
$accessibleTag = $isAccessible ? 'a1' : 'a0';

View file

@ -44,7 +44,7 @@ class CreditsAction extends FormlessAction {
* @return string HTML
*/
public function onView() {
if ( $this->getWikiPage()->getID() == 0 ) {
if ( $this->getWikiPage()->getId() == 0 ) {
$s = $this->msg( 'nocredits' )->parse();
} else {
$s = $this->getCredits( -1 );

View file

@ -1601,8 +1601,8 @@ class DifferenceEngine extends ContextSource {
|| !$this->mOldPage->equals( $this->mNewPage )
|| $this->mOldRev->getId() === null || $this->mNewRev->getId() === null
// (T237709) Deleted revs might have different page IDs
|| $this->mNewPage->getArticleId() !== $this->mOldRev->getPage()
|| $this->mNewPage->getArticleId() !== $this->mNewRev->getPage()
|| $this->mNewPage->getArticleID() !== $this->mOldRev->getPage()
|| $this->mNewPage->getArticleID() !== $this->mNewRev->getPage()
) {
return '';
}

View file

@ -1519,7 +1519,7 @@ abstract class Skin extends ContextSource {
// Singular if only 1 unseen revision, plural if several unseen revisions.
$plural = $latestRev->getParentId() !== $lastSeenRev->getId();
$nOfAuthors = $revStore->countAuthorsBetween(
$uTalkTitle->getArticleId(),
$uTalkTitle->getArticleID(),
$lastSeenRev->getRevisionRecord(),
$latestRev,
null,

View file

@ -2,7 +2,7 @@
namespace MediaWiki\Hook;
use SpecialNewPages;
use SpecialNewpages;
use stdClass;
/**

View file

@ -2,7 +2,7 @@
namespace MediaWiki\Hook;
use SpecialNewPages;
use SpecialNewpages;
/**
* @stable for implementation

View file

@ -360,7 +360,7 @@ class SpecialMergeHistory extends SpecialPage {
}
// MergeHistory object
$factory = MediawikiServices::getInstance()->getMergeHistoryFactory();
$factory = MediaWikiServices::getInstance()->getMergeHistoryFactory();
$mh = $factory->newMergeHistory( $targetTitle, $destTitle, $this->mTimestamp );
// Merge!

View file

@ -52,7 +52,7 @@ class GeneratePhpCharToUpperMappings extends Maintenance {
->limits( [ 'memory' => 1024 * 1024 ] )
->execute();
if ( $result->getExitcode() !== 0 ) {
if ( $result->getExitCode() !== 0 ) {
$this->output( $result->getStderr() );
return;
}

View file

@ -486,7 +486,7 @@ class UppercaseTitlesForUnicodeTransition extends Maintenance {
}
if ( (int)$oldRow->ns === $newTitle->getNamespace() &&
$oldRow->title === $newTitle->getDBKey()
$oldRow->title === $newTitle->getDBkey()
) {
return $this->reason . ", and found that [[{$oldTitle->getPrefixedText()}]] is "
. "already a redirect to [[{$newTitle->getPrefixedText()}]]";

View file

@ -530,7 +530,7 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
protected function mediaWikiSetUp() {
$reflection = new ReflectionClass( $this );
// TODO: Eventually we should assert for test presence in /integration/
if ( strpos( $reflection->getFilename(), '/unit/' ) !== false ) {
if ( strpos( $reflection->getFileName(), '/unit/' ) !== false ) {
$this->fail( 'This integration test should not be in "tests/phpunit/unit" !' );
}

View file

@ -67,7 +67,7 @@ abstract class MediaWikiUnitTestCase extends TestCase {
$reflection = new ReflectionClass( static::class );
$dirSeparator = DIRECTORY_SEPARATOR;
if ( stripos( $reflection->getFilename(), "${dirSeparator}unit${dirSeparator}" ) === false ) {
if ( stripos( $reflection->getFileName(), "${dirSeparator}unit${dirSeparator}" ) === false ) {
self::fail( 'This unit test needs to be in "tests/phpunit/unit"!' );
}

View file

@ -153,7 +153,7 @@ class ContentSecurityPolicyTest extends MediaWikiTestCase {
$actualReport = $this->csp->makeCSPDirectives(
$policy, ContentSecurityPolicy::REPORT_ONLY_MODE
);
$policyJson = formatJson::encode( $policy );
$policyJson = FormatJson::encode( $policy );
$this->assertSame( $expectedFull, $actualFull, "full: " . $policyJson );
$this->assertSame( $expectedReport, $actualReport, "report: " . $policyJson );
}

View file

@ -108,13 +108,13 @@ class MovePageTest extends MediaWikiTestCase {
$this->getExistingTestPage( 'File:Non-file.jpg' );
$this->getExistingTestPage( 'MediaWiki:Existent.js' );
$this->getExistingTestPage( 'Hooked in place' );
$this->getNonExistingTestPage( 'Nonexistent' );
$this->getNonExistingTestPage( 'Nonexistent2' );
$this->getNonExistingTestPage( 'File:Nonexistent.jpg' );
$this->getNonExistingTestPage( 'File:Nonexistent.png' );
$this->getNonExistingTestPage( 'File:Existent-file-no-page.jpg' );
$this->getNonExistingTestPage( 'MediaWiki:Nonexistent' );
$this->getNonExistingTestPage( 'No content allowed' );
$this->getNonexistingTestPage( 'Nonexistent' );
$this->getNonexistingTestPage( 'Nonexistent2' );
$this->getNonexistingTestPage( 'File:Nonexistent.jpg' );
$this->getNonexistingTestPage( 'File:Nonexistent.png' );
$this->getNonexistingTestPage( 'File:Existent-file-no-page.jpg' );
$this->getNonexistingTestPage( 'MediaWiki:Nonexistent' );
$this->getNonexistingTestPage( 'No content allowed' );
// Set a couple of hooks for specific pages
$this->setTemporaryHook( 'ContentModelCanBeUsedOn',

View file

@ -3027,7 +3027,7 @@ class OutputPageTest extends MediaWikiTestCase {
] );
$output->enableClientCache( $options['enableClientCache'] ?? true );
$output->setCdnMaxAge( $options['cdnMaxAge'] ?? 0 );
$output->setCdnMaxage( $options['cdnMaxAge'] ?? 0 );
if ( isset( $options['lastModified'] ) ) {
$output->setLastModified( $options['lastModified'] );

View file

@ -296,7 +296,7 @@ class TitleTest extends MediaWikiTestCase {
* @param string $action
* @param array|string|bool $expected Required error
*
* @covers \Mediawiki\Permissions\PermissionManager::checkReadPermissions
* @covers \MediaWiki\Permissions\PermissionManager::checkReadPermissions
* @dataProvider dataWgWhitelistReadRegexp
*/
public function testWgWhitelistReadRegexp( $whitelistRegexp, $source, $action, $expected ) {

View file

@ -221,7 +221,7 @@ class WatchActionTest extends MediaWikiTestCase {
*/
public function testDoUnWatchWithoutRights() {
$notPermittedUser = $this->getUser( null, null, [] );
$actual = WatchAction::doUnWatch( $this->testWikiPage->getTitle(), $notPermittedUser );
$actual = WatchAction::doUnwatch( $this->testWikiPage->getTitle(), $notPermittedUser );
$this->assertFalse( $actual->isGood() );
}
@ -235,7 +235,7 @@ class WatchActionTest extends MediaWikiTestCase {
return false;
} );
$status = WatchAction::doUnWatch( $this->testWikiPage->getTitle(), $permittedUser );
$status = WatchAction::doUnwatch( $this->testWikiPage->getTitle(), $permittedUser );
$this->assertFalse( $status->isGood() );
$errors = $status->getErrors();
@ -253,7 +253,7 @@ class WatchActionTest extends MediaWikiTestCase {
->method( 'removeWatch' )
->with( $this->equalTo( $this->testWikiPage->getTitle() ) );
$actual = WatchAction::doUnWatch( $this->testWikiPage->getTitle(), $permittedUser );
$actual = WatchAction::doUnwatch( $this->testWikiPage->getTitle(), $permittedUser );
$this->assertTrue( $actual->isGood() );
}

View file

@ -1326,7 +1326,7 @@ class ApiBaseTest extends ApiTestCase {
$user = $this->getMutableTestUser()->getUser();
$block = new DatabaseBlock( [
'address' => $user->getName(),
'user' => $user->getID(),
'user' => $user->getId(),
'by' => $this->getTestSysop()->getUser()->getId(),
'reason' => __METHOD__,
'expiry' => time() + 100500,
@ -1385,7 +1385,7 @@ class ApiBaseTest extends ApiTestCase {
$user = $this->getMutableTestUser()->getUser();
$block = new DatabaseBlock( [
'address' => $user->getName(),
'user' => $user->getID(),
'user' => $user->getId(),
'by' => $this->getTestSysop()->getUser()->getId(),
'reason' => __METHOD__,
'expiry' => time() + 100500,

View file

@ -490,7 +490,7 @@ class ApiParseTest extends ApiTestCase {
}
public function testSerializationError() {
$this->expectException( APIUsageException::class );
$this->expectException( ApiUsageException::class );
$this->expectExceptionMessage( 'Content serialization failed: Could not unserialize content' );
$this->mergeMwGlobalArrayValue( 'wgContentHandlers',

View file

@ -45,7 +45,7 @@ class ApiUnblockTest extends ApiTestCase {
if ( array_key_exists( 'userid', $params ) ) {
return DatabaseBlock::newFromTarget( User::newFromId( $params['userid'] ) );
}
return DatabaseBlock::newFromId( $params['id'] );
return DatabaseBlock::newFromID( $params['id'] );
}
/**
@ -154,7 +154,7 @@ class ApiUnblockTest extends ApiTestCase {
}
public function testUnblockNonexistentBlock() {
$this->setExpectedAPIException( [ 'ipb_cant_unblock', $this->blocker->getName() ] );
$this->setExpectedApiException( [ 'ipb_cant_unblock', $this->blocker->getName() ] );
$this->doUnblock( [ 'user' => $this->blocker ] );
}

View file

@ -5,7 +5,7 @@ namespace MediaWiki\Auth;
use Config;
use MediaWiki\Block\DatabaseBlock;
use MediaWiki\MediaWikiServices;
use Mediawiki\Permissions\PermissionManager;
use MediaWiki\Permissions\PermissionManager;
use MediaWiki\Session\SessionInfo;
use MediaWiki\Session\UserInfo;
use PHPUnit\Framework\Assert;
@ -1460,7 +1460,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
$this->initializeManager( true );
$user = \User::newFromName( 'UTBlockee' );
if ( $user->getID() == 0 ) {
if ( $user->getId() == 0 ) {
$user->addToDatabase();
\TestUser::setPasswordForUser( $user, 'UTBlockeePassword' );
$user->saveSettings();
@ -1472,7 +1472,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
}
$blockOptions = [
'address' => 'UTBlockee',
'user' => $user->getID(),
'user' => $user->getId(),
'by' => $this->getTestSysop()->getUser()->getId(),
'reason' => __METHOD__,
'expiry' => time() + 100500,

View file

@ -64,7 +64,7 @@ class CheckBlocksSecondaryAuthenticationProviderTest extends \MediaWikiTestCase
private function getBlockedUser() {
$user = \User::newFromName( 'UTBlockee' );
if ( $user->getID() == 0 ) {
if ( $user->getId() == 0 ) {
$user->addToDatabase();
\TestUser::setPasswordForUser( $user, 'UTBlockeePassword' );
$user->saveSettings();
@ -76,7 +76,7 @@ class CheckBlocksSecondaryAuthenticationProviderTest extends \MediaWikiTestCase
}
$blockOptions = [
'address' => 'UTBlockee',
'user' => $user->getID(),
'user' => $user->getId(),
'by' => $this->getTestSysop()->getUser()->getId(),
'reason' => __METHOD__,
'expiry' => time() + 100500,
@ -161,7 +161,7 @@ class CheckBlocksSecondaryAuthenticationProviderTest extends \MediaWikiTestCase
$scopeVariable = new \Wikimedia\ScopedCallback( [ $block, 'delete' ] );
$user = \User::newFromName( 'UTNormalUser' );
if ( $user->getID() == 0 ) {
if ( $user->getId() == 0 ) {
$user->addToDatabase();
\TestUser::setPasswordForUser( $user, 'UTNormalUserPassword' );
$user->saveSettings();

View file

@ -226,7 +226,7 @@ class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
new NamespaceRestriction( $block->getId(), NS_USER ),
] );
$db = wfGetDb( DB_REPLICA );
$db = wfGetDB( DB_REPLICA );
$result = $db->select(
[ 'ipblocks_restrictions' ],
[ '*' ],
@ -252,7 +252,7 @@ class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
new PageRestriction( $block->getId(), $page->getId() ),
] );
$db = wfGetDb( DB_REPLICA );
$db = wfGetDB( DB_REPLICA );
$result = $db->select(
[ 'ipblocks_restrictions' ],
[ '*' ],
@ -275,7 +275,7 @@ class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
$this->blockRestrictionStore->update( [] );
$db = wfGetDb( DB_REPLICA );
$db = wfGetDB( DB_REPLICA );
$result = $db->select(
[ 'ipblocks_restrictions' ],
[ '*' ],
@ -301,7 +301,7 @@ class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
new PageRestriction( $block->getId(), $page->getId() ),
] );
$db = wfGetDb( DB_REPLICA );
$db = wfGetDB( DB_REPLICA );
$result = $db->select(
[ 'ipblocks_restrictions' ],
[ '*' ],

View file

@ -42,7 +42,7 @@ class PageRestrictionTest extends RestrictionTestCase {
$this->assertSame( $title, $restriction->getTitle() );
$restriction = new $class( 1, 1 );
$title = \Title::newFromId( 1 );
$title = \Title::newFromID( 1 );
$this->assertEquals( $title->getArticleID(), $restriction->getTitle()->getArticleID() );
}

View file

@ -449,7 +449,7 @@ class LBFactoryTest extends MediaWikiTestCase {
$this->assertSame(
'',
$db->getDomainId(),
$db->getDomainID(),
'Null domain ID handle used'
);
$this->assertNull(

View file

@ -98,10 +98,10 @@ class DeprecationHelperTest extends MediaWikiTestCase {
public function testSubclassGetSet() {
$fullName = 'TestDeprecatedClass::$privateNonDeprecated';
$this->assertErrorTriggered( function () {
$this->assertSame( null, $this->testSubclass->getNonDeprecatedPrivateParentProperty() );
$this->assertSame( null, $this->testSubclass->getNondeprecatedPrivateParentProperty() );
}, E_USER_ERROR, "Cannot access non-public property $fullName" );
$this->assertErrorTriggered( function () {
$this->testSubclass->setNonDeprecatedPrivateParentProperty( 0 );
$this->testSubclass->setNondeprecatedPrivateParentProperty( 0 );
$wrapper = TestingAccessWrapper::newFromObject( $this->testSubclass );
$this->assertSame( 1, $wrapper->privateNonDeprecated );
}, E_USER_ERROR, "Cannot access non-public property $fullName" );

View file

@ -648,17 +648,17 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
$this->assertEquals( $ud->getId(), $this->db->getDomainID() );
$old = $this->db->tablePrefix();
$oldDomain = $this->db->getDomainId();
$oldDomain = $this->db->getDomainID();
$this->assertIsString( $old, 'Prefix is string' );
$this->assertSame( $old, $this->db->tablePrefix(), "Prefix unchanged" );
$this->assertSame( $old, $this->db->tablePrefix( 'xxx_' ) );
$this->assertSame( 'xxx_', $this->db->tablePrefix(), "Prefix set" );
$this->db->tablePrefix( $old );
$this->assertNotEquals( 'xxx_', $this->db->tablePrefix() );
$this->assertSame( $oldDomain, $this->db->getDomainId() );
$this->assertSame( $oldDomain, $this->db->getDomainID() );
$old = $this->db->dbSchema();
$oldDomain = $this->db->getDomainId();
$oldDomain = $this->db->getDomainID();
$this->assertIsString( $old, 'Schema is string' );
$this->assertSame( $old, $this->db->dbSchema(), "Schema unchanged" );
@ -667,7 +667,7 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
$this->assertSame( 'xxx', $this->db->dbSchema(), "Schema set" );
$this->db->dbSchema( $old );
$this->assertNotEquals( 'xxx', $this->db->dbSchema() );
$this->assertSame( "y", $this->db->getDomainId() );
$this->assertSame( "y", $this->db->getDomainID() );
}
/**
@ -688,7 +688,7 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
* @covers Wikimedia\Rdbms\Database::selectDomain
*/
public function testSelectDomain() {
$oldDomain = $this->db->getDomainId();
$oldDomain = $this->db->getDomainID();
$oldDatabase = $this->db->getDBname();
$oldSchema = $this->db->dbSchema();
$oldPrefix = $this->db->tablePrefix();
@ -702,7 +702,7 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
$this->assertSame( $oldDatabase, $this->db->getDBname() );
$this->assertSame( $oldSchema, $this->db->dbSchema() );
$this->assertSame( $oldPrefix, $this->db->tablePrefix() );
$this->assertSame( $oldDomain, $this->db->getDomainId() );
$this->assertSame( $oldDomain, $this->db->getDomainID() );
$this->db->selectDomain( 'testselectdb-schema-xxx_' );
$this->assertSame( 'testselectdb', $this->db->getDBname() );
@ -713,7 +713,7 @@ class DatabaseTest extends PHPUnit\Framework\TestCase {
$this->assertSame( $oldDatabase, $this->db->getDBname() );
$this->assertSame( $oldSchema, $this->db->dbSchema() );
$this->assertSame( $oldPrefix, $this->db->tablePrefix() );
$this->assertSame( $oldDomain, $this->db->getDomainId() );
$this->assertSame( $oldDomain, $this->db->getDomainID() );
}
/**

View file

@ -84,7 +84,7 @@ class SelectQueryBuilderTest extends PHPUnit\Framework\TestCase {
'sq'
)
->field( 'sq.f' );
$this->assertSql( 'SELECT sq.f FROM (SELECT f FROM t FORCE INDEX (i) ) sq' );
$this->assertSQL( 'SELECT sq.f FROM (SELECT f FROM t FORCE INDEX (i) ) sq' );
}
public function testTablesFields() {

View file

@ -784,13 +784,13 @@ mw.loader.register([
$context = $this->getResourceLoaderContext();
$this->setMwGlobals( 'wgArticlePath', '/w1' );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version1 = $module->getVersionHash( $context );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version2 = $module->getVersionHash( $context );
$this->setMwGlobals( 'wgArticlePath', '/w3' );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version3 = $module->getVersionHash( $context );
$this->assertEquals(
@ -816,7 +816,7 @@ mw.loader.register([
'test.a' => [ 'class' => ResourceLoaderTestModule::class ],
'test.b' => [ 'class' => ResourceLoaderTestModule::class ],
] );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version1 = $module->getVersionHash( $context1 );
$context2 = $this->getResourceLoaderContext();
@ -825,7 +825,7 @@ mw.loader.register([
'test.b' => [ 'class' => ResourceLoaderTestModule::class ],
'test.c' => [ 'class' => ResourceLoaderTestModule::class ],
] );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version2 = $module->getVersionHash( $context2 );
$context3 = $this->getResourceLoaderContext();
@ -837,7 +837,7 @@ mw.loader.register([
'script' => 'different',
],
] );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version3 = $module->getVersionHash( $context3 );
// Module name *is* significant (T201686)
@ -855,7 +855,7 @@ mw.loader.register([
}
/**
* @covers ResourceLoaderStartupModule
* @covers ResourceLoaderStartUpModule
*/
public function testGetVersionHash_varyDeps() {
$context = $this->getResourceLoaderContext();
@ -866,7 +866,7 @@ mw.loader.register([
'dependencies' => [ 'x', 'y' ],
],
] );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version1 = $module->getVersionHash( $context );
$context = $this->getResourceLoaderContext();
@ -877,7 +877,7 @@ mw.loader.register([
'dependencies' => [ 'x', 'z' ],
],
] );
$module = new ResourceLoaderStartupModule();
$module = new ResourceLoaderStartUpModule();
$version2 = $module->getVersionHash( $context );
// Dependencies *are* significant (T201686)

View file

@ -1,6 +1,6 @@
<?php
class SearchResultTraitTest extends MediawikiTestCase {
class SearchResultTraitTest extends MediaWikiTestCase {
/**
* @covers SearchResultTrait::getExtensionData
* @covers SearchResultTrait::setExtensionData

View file

@ -354,9 +354,9 @@ trait FileBackendGroupTestTrait {
*/
public function testBackendFromPath( $expected, $storagePath ) {
$obj = $this->newObj( [ 'FileBackends' => [
[ 'name' => '', 'class' => stdclass::class, 'lockManager' => 'fsLockManager' ],
[ 'name' => 'a', 'class' => stdclass::class, 'lockManager' => 'fsLockManager' ],
[ 'name' => 'b', 'class' => stdclass::class, 'lockManager' => 'fsLockManager' ],
[ 'name' => '', 'class' => stdClass::class, 'lockManager' => 'fsLockManager' ],
[ 'name' => 'a', 'class' => stdClass::class, 'lockManager' => 'fsLockManager' ],
[ 'name' => 'b', 'class' => stdClass::class, 'lockManager' => 'fsLockManager' ],
] ] );
$this->assertSame(
$expected === null ? null : $obj->get( $expected ),

View file

@ -51,7 +51,7 @@ class FileJournalTest extends MediaWikiUnitTestCase {
$time1 = time();
$uuid = $obj->getTimestampedUUID();
$time2 = time();
$this->assertRegexp( '/^[0-9a-z]{31}$/', $uuid );
$this->assertRegExp( '/^[0-9a-z]{31}$/', $uuid );
$this->assertArrayNotHasKey( $uuid, $uuids );
$uuids[$uuid] = true;

View file

@ -49,7 +49,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() );
@ -67,7 +67,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() );