aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReedy <reedy@wikimedia.org>2020-05-26 14:14:46 +0100
committerReedy <reedy@wikimedia.org>2020-05-26 14:14:46 +0100
commit229b2c15e85a2aa32499c17e3e8330a20cac9e62 (patch)
treeac56b1d59f2757f4226abeb8653d53edc6cf4e52
parent111ae6400d35b69c401bb5a91b9b72501b94b0e4 (diff)
downloadmediawikicore-229b2c15e85a2aa32499c17e3e8330a20cac9e62.tar.gz
mediawikicore-229b2c15e85a2aa32499c17e3e8330a20cac9e62.zip
Fix a plethora of class and function call case mismatches
Bug: T231412 Change-Id: I597a25de3294a6673424f30475760280ef209a8a
-rw-r--r--includes/EditPage.php2
-rw-r--r--includes/Rest/Handler/LatestPageContentHandler.php2
-rw-r--r--includes/Rest/Handler/PageSourceHandler.php2
-rw-r--r--includes/actions/CreditsAction.php2
-rw-r--r--includes/diff/DifferenceEngine.php4
-rw-r--r--includes/skins/Skin.php2
-rw-r--r--includes/specials/Hook/NewPagesLineEndingHook.php2
-rw-r--r--includes/specials/Hook/SpecialNewPagesFiltersHook.php2
-rw-r--r--includes/specials/SpecialMergeHistory.php2
-rwxr-xr-xmaintenance/mediawiki.Title/generatePhpCharToUpperMappings.php2
-rw-r--r--maintenance/uppercaseTitlesForUnicodeTransition.php2
-rw-r--r--tests/phpunit/MediaWikiIntegrationTestCase.php2
-rw-r--r--tests/phpunit/MediaWikiUnitTestCase.php2
-rw-r--r--tests/phpunit/includes/ContentSecurityPolicyTest.php2
-rw-r--r--tests/phpunit/includes/MovePageTest.php14
-rw-r--r--tests/phpunit/includes/OutputPageTest.php2
-rw-r--r--tests/phpunit/includes/TitleTest.php2
-rw-r--r--tests/phpunit/includes/actions/WatchActionTest.php6
-rw-r--r--tests/phpunit/includes/api/ApiBaseTest.php4
-rw-r--r--tests/phpunit/includes/api/ApiParseTest.php2
-rw-r--r--tests/phpunit/includes/api/ApiUnblockTest.php4
-rw-r--r--tests/phpunit/includes/auth/AuthManagerTest.php6
-rw-r--r--tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php6
-rw-r--r--tests/phpunit/includes/block/BlockRestrictionStoreTest.php8
-rw-r--r--tests/phpunit/includes/block/Restriction/PageRestrictionTest.php2
-rw-r--r--tests/phpunit/includes/db/LBFactoryTest.php2
-rw-r--r--tests/phpunit/includes/debug/DeprecationHelperTest.php4
-rw-r--r--tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php14
-rw-r--r--tests/phpunit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php2
-rw-r--r--tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php18
-rw-r--r--tests/phpunit/includes/search/SearchResultTraitTest.php2
-rw-r--r--tests/phpunit/unit/includes/filebackend/FileBackendGroupTestTrait.php6
-rw-r--r--tests/phpunit/unit/includes/libs/filebackend/filejournal/FileJournalTest.php2
-rw-r--r--tests/phpunit/unit/includes/title/TitleValueTest.php4
34 files changed, 70 insertions, 70 deletions
diff --git a/includes/EditPage.php b/includes/EditPage.php
index b85bf1e95f4a..29a1cede87b3 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -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
diff --git a/includes/Rest/Handler/LatestPageContentHandler.php b/includes/Rest/Handler/LatestPageContentHandler.php
index 7e060e2629e3..f1c218aced70 100644
--- a/includes/Rest/Handler/LatestPageContentHandler.php
+++ b/includes/Rest/Handler/LatestPageContentHandler.php
@@ -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(),
diff --git a/includes/Rest/Handler/PageSourceHandler.php b/includes/Rest/Handler/PageSourceHandler.php
index a205f34fdc7f..1eb2ccce6411 100644
--- a/includes/Rest/Handler/PageSourceHandler.php
+++ b/includes/Rest/Handler/PageSourceHandler.php
@@ -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';
diff --git a/includes/actions/CreditsAction.php b/includes/actions/CreditsAction.php
index 0616bccdeb6a..749f4ce02bd2 100644
--- a/includes/actions/CreditsAction.php
+++ b/includes/actions/CreditsAction.php
@@ -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 );
diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php
index 34f5803f4d43..ef622d694b42 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -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 '';
}
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index 29c57479463a..4047a946b64c 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -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,
diff --git a/includes/specials/Hook/NewPagesLineEndingHook.php b/includes/specials/Hook/NewPagesLineEndingHook.php
index 67ffdbb23001..a311b19b7916 100644
--- a/includes/specials/Hook/NewPagesLineEndingHook.php
+++ b/includes/specials/Hook/NewPagesLineEndingHook.php
@@ -2,7 +2,7 @@
namespace MediaWiki\Hook;
-use SpecialNewPages;
+use SpecialNewpages;
use stdClass;
/**
diff --git a/includes/specials/Hook/SpecialNewPagesFiltersHook.php b/includes/specials/Hook/SpecialNewPagesFiltersHook.php
index e23910a64cda..6e2dc16ba2a5 100644
--- a/includes/specials/Hook/SpecialNewPagesFiltersHook.php
+++ b/includes/specials/Hook/SpecialNewPagesFiltersHook.php
@@ -2,7 +2,7 @@
namespace MediaWiki\Hook;
-use SpecialNewPages;
+use SpecialNewpages;
/**
* @stable for implementation
diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php
index 8909311e2870..df809d960981 100644
--- a/includes/specials/SpecialMergeHistory.php
+++ b/includes/specials/SpecialMergeHistory.php
@@ -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!
diff --git a/maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php b/maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php
index 051fdc174637..bd09be73a169 100755
--- a/maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php
+++ b/maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php
@@ -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;
}
diff --git a/maintenance/uppercaseTitlesForUnicodeTransition.php b/maintenance/uppercaseTitlesForUnicodeTransition.php
index ab97920e4ead..f6bc1d13c8c3 100644
--- a/maintenance/uppercaseTitlesForUnicodeTransition.php
+++ b/maintenance/uppercaseTitlesForUnicodeTransition.php
@@ -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()}]]";
diff --git a/tests/phpunit/MediaWikiIntegrationTestCase.php b/tests/phpunit/MediaWikiIntegrationTestCase.php
index 84ceb03d34d2..15d1f8b54361 100644
--- a/tests/phpunit/MediaWikiIntegrationTestCase.php
+++ b/tests/phpunit/MediaWikiIntegrationTestCase.php
@@ -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" !' );
}
diff --git a/tests/phpunit/MediaWikiUnitTestCase.php b/tests/phpunit/MediaWikiUnitTestCase.php
index 38a6a57ed777..3b60915a7ea8 100644
--- a/tests/phpunit/MediaWikiUnitTestCase.php
+++ b/tests/phpunit/MediaWikiUnitTestCase.php
@@ -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"!' );
}
diff --git a/tests/phpunit/includes/ContentSecurityPolicyTest.php b/tests/phpunit/includes/ContentSecurityPolicyTest.php
index 6e7dd9a010ef..da934e0e3392 100644
--- a/tests/phpunit/includes/ContentSecurityPolicyTest.php
+++ b/tests/phpunit/includes/ContentSecurityPolicyTest.php
@@ -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 );
}
diff --git a/tests/phpunit/includes/MovePageTest.php b/tests/phpunit/includes/MovePageTest.php
index 4135ea8c64af..41c117624b98 100644
--- a/tests/phpunit/includes/MovePageTest.php
+++ b/tests/phpunit/includes/MovePageTest.php
@@ -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',
diff --git a/tests/phpunit/includes/OutputPageTest.php b/tests/phpunit/includes/OutputPageTest.php
index 97bcd779ee71..37328059dbe6 100644
--- a/tests/phpunit/includes/OutputPageTest.php
+++ b/tests/phpunit/includes/OutputPageTest.php
@@ -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'] );
diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php
index 23dea13e30f6..26bff942df7b 100644
--- a/tests/phpunit/includes/TitleTest.php
+++ b/tests/phpunit/includes/TitleTest.php
@@ -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 ) {
diff --git a/tests/phpunit/includes/actions/WatchActionTest.php b/tests/phpunit/includes/actions/WatchActionTest.php
index 6601e0cf37d2..6ea3d666d0c9 100644
--- a/tests/phpunit/includes/actions/WatchActionTest.php
+++ b/tests/phpunit/includes/actions/WatchActionTest.php
@@ -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() );
}
diff --git a/tests/phpunit/includes/api/ApiBaseTest.php b/tests/phpunit/includes/api/ApiBaseTest.php
index bb5cc63ea10b..2deec2fb935c 100644
--- a/tests/phpunit/includes/api/ApiBaseTest.php
+++ b/tests/phpunit/includes/api/ApiBaseTest.php
@@ -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,
diff --git a/tests/phpunit/includes/api/ApiParseTest.php b/tests/phpunit/includes/api/ApiParseTest.php
index ba8e1b094ec9..3857ba1f9b6d 100644
--- a/tests/phpunit/includes/api/ApiParseTest.php
+++ b/tests/phpunit/includes/api/ApiParseTest.php
@@ -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',
diff --git a/tests/phpunit/includes/api/ApiUnblockTest.php b/tests/phpunit/includes/api/ApiUnblockTest.php
index f0931517f28b..ee789fd3190e 100644
--- a/tests/phpunit/includes/api/ApiUnblockTest.php
+++ b/tests/phpunit/includes/api/ApiUnblockTest.php
@@ -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 ] );
}
diff --git a/tests/phpunit/includes/auth/AuthManagerTest.php b/tests/phpunit/includes/auth/AuthManagerTest.php
index 2476347a1434..72c47025f909 100644
--- a/tests/phpunit/includes/auth/AuthManagerTest.php
+++ b/tests/phpunit/includes/auth/AuthManagerTest.php
@@ -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,
diff --git a/tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php
index 7673e9cd568d..9054625a00f6 100644
--- a/tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php
+++ b/tests/phpunit/includes/auth/CheckBlocksSecondaryAuthenticationProviderTest.php
@@ -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();
diff --git a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
index 513bbf31dafe..c79a9309a802 100644
--- a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
+++ b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
@@ -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' ],
[ '*' ],
diff --git a/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php b/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php
index c5478787608b..3365a410e889 100644
--- a/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php
+++ b/tests/phpunit/includes/block/Restriction/PageRestrictionTest.php
@@ -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() );
}
diff --git a/tests/phpunit/includes/db/LBFactoryTest.php b/tests/phpunit/includes/db/LBFactoryTest.php
index 476d11a18ce4..2a34a02141d8 100644
--- a/tests/phpunit/includes/db/LBFactoryTest.php
+++ b/tests/phpunit/includes/db/LBFactoryTest.php
@@ -449,7 +449,7 @@ class LBFactoryTest extends MediaWikiTestCase {
$this->assertSame(
'',
- $db->getDomainId(),
+ $db->getDomainID(),
'Null domain ID handle used'
);
$this->assertNull(
diff --git a/tests/phpunit/includes/debug/DeprecationHelperTest.php b/tests/phpunit/includes/debug/DeprecationHelperTest.php
index 3d3b65372b33..567797e82925 100644
--- a/tests/phpunit/includes/debug/DeprecationHelperTest.php
+++ b/tests/phpunit/includes/debug/DeprecationHelperTest.php
@@ -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" );
diff --git a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
index e871e21c07cb..e4a2eaa7d7be 100644
--- a/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
+++ b/tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
@@ -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() );
}
/**
diff --git a/tests/phpunit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php b/tests/phpunit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php
index 629acf11baef..9e1dc878a801 100644
--- a/tests/phpunit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php
+++ b/tests/phpunit/includes/libs/rdbms/querybuilder/SelectQueryBuilderTest.php
@@ -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() {
diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php
index 9cc56b29892f..b539ec7a8441 100644
--- a/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php
+++ b/tests/phpunit/includes/resourceloader/ResourceLoaderStartUpModuleTest.php
@@ -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)
diff --git a/tests/phpunit/includes/search/SearchResultTraitTest.php b/tests/phpunit/includes/search/SearchResultTraitTest.php
index 6700c56a2f99..75ff54aee127 100644
--- a/tests/phpunit/includes/search/SearchResultTraitTest.php
+++ b/tests/phpunit/includes/search/SearchResultTraitTest.php
@@ -1,6 +1,6 @@
<?php
-class SearchResultTraitTest extends MediawikiTestCase {
+class SearchResultTraitTest extends MediaWikiTestCase {
/**
* @covers SearchResultTrait::getExtensionData
* @covers SearchResultTrait::setExtensionData
diff --git a/tests/phpunit/unit/includes/filebackend/FileBackendGroupTestTrait.php b/tests/phpunit/unit/includes/filebackend/FileBackendGroupTestTrait.php
index df27cbf39a9e..08190e7eeb0c 100644
--- a/tests/phpunit/unit/includes/filebackend/FileBackendGroupTestTrait.php
+++ b/tests/phpunit/unit/includes/filebackend/FileBackendGroupTestTrait.php
@@ -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 ),
diff --git a/tests/phpunit/unit/includes/libs/filebackend/filejournal/FileJournalTest.php b/tests/phpunit/unit/includes/libs/filebackend/filejournal/FileJournalTest.php
index d009b76e07fc..c1db66106bd8 100644
--- a/tests/phpunit/unit/includes/libs/filebackend/filejournal/FileJournalTest.php
+++ b/tests/phpunit/unit/includes/libs/filebackend/filejournal/FileJournalTest.php
@@ -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;
diff --git a/tests/phpunit/unit/includes/title/TitleValueTest.php b/tests/phpunit/unit/includes/title/TitleValueTest.php
index 1dbe4b211137..263001dff402 100644
--- a/tests/phpunit/unit/includes/title/TitleValueTest.php
+++ b/tests/phpunit/unit/includes/title/TitleValueTest.php
@@ -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() );