diff options
author | Reedy <reedy@wikimedia.org> | 2016-03-18 13:55:54 +0000 |
---|---|---|
committer | Krinkle <krinklemail@gmail.com> | 2016-03-18 23:14:49 +0000 |
commit | 1834ee3d8e2f6a8ef2067ee7925c4f561209b12f (patch) | |
tree | 45b7e5708d0328a21e58884aee206d381acf33da | |
parent | ecfdb46916567cf4ea466135f9a053d6feca2afe (diff) | |
download | mediawikicore-1834ee3d8e2f6a8ef2067ee7925c4f561209b12f.tar.gz mediawikicore-1834ee3d8e2f6a8ef2067ee7925c4f561209b12f.zip |
Fix numerous class/function casing
Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715
41 files changed, 63 insertions, 63 deletions
diff --git a/includes/db/DatabaseMysqli.php b/includes/db/DatabaseMysqli.php index 8ca2362773aa..d45805ad462a 100644 --- a/includes/db/DatabaseMysqli.php +++ b/includes/db/DatabaseMysqli.php @@ -322,7 +322,7 @@ class DatabaseMysqli extends DatabaseMysqlBase { * @return string */ public function __toString() { - if ( $this->mConn instanceof Mysqli ) { + if ( $this->mConn instanceof mysqli ) { return (string)$this->mConn->thread_id; } else { // mConn might be false or something. diff --git a/includes/htmlform/HTMLTitleTextField.php b/includes/htmlform/HTMLTitleTextField.php index 410d15d080ff..fcf721a57be9 100644 --- a/includes/htmlform/HTMLTitleTextField.php +++ b/includes/htmlform/HTMLTitleTextField.php @@ -86,7 +86,7 @@ class HTMLTitleTextField extends HTMLTextField { $this->mClass .= 'mw-searchInput'; // return the HTMLTextField html - return parent::getInputHtml( $value ); + return parent::getInputHTML( $value ); } protected function getDataAttribs() { diff --git a/includes/htmlform/HTMLUserTextField.php b/includes/htmlform/HTMLUserTextField.php index 92b35a833147..5a7e0b9b854a 100644 --- a/includes/htmlform/HTMLUserTextField.php +++ b/includes/htmlform/HTMLUserTextField.php @@ -51,6 +51,6 @@ class HTMLUserTextField extends HTMLTextField { $this->mClass .= ' mw-autocomplete-user'; // return parent html - return parent::getInputHtml( $value ); + return parent::getInputHTML( $value ); } } diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php index b6740d2a8347..98ae34f147da 100644 --- a/includes/import/WikiImporter.php +++ b/includes/import/WikiImporter.php @@ -604,7 +604,7 @@ class WikiImporter { $normalFields = [ 'sitename', 'base', 'generator', 'case' ]; while ( $this->reader->read() ) { - if ( $this->reader->nodeType == XmlReader::END_ELEMENT && + if ( $this->reader->nodeType == XMLReader::END_ELEMENT && $this->reader->localName == 'siteinfo' ) { break; } diff --git a/includes/installer/WebInstallerComplete.php b/includes/installer/WebInstallerComplete.php index ffab9bb2e79a..11a183314a01 100644 --- a/includes/installer/WebInstallerComplete.php +++ b/includes/installer/WebInstallerComplete.php @@ -24,12 +24,12 @@ class WebInstallerComplete extends WebInstallerPage { public function execute() { // Pop up a dialog box, to make it difficult for the user to forget // to download the file - $lsUrl = $this->getVar( 'wgServer' ) . $this->parent->getURL( [ 'localsettings' => 1 ] ); + $lsUrl = $this->getVar( 'wgServer' ) . $this->parent->getUrl( [ 'localsettings' => 1 ] ); if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) { // JS appears to be the only method that works consistently with IE7+ - $this->addHtml( "\n<script>jQuery( function () { location.href = " . + $this->addHTML( "\n<script>jQuery( function () { location.href = " . Xml::encodeJsVar( $lsUrl ) . "; } );</script>\n" ); } else { $this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" ); diff --git a/includes/installer/WebInstallerInstall.php b/includes/installer/WebInstallerInstall.php index 9d0d680cfd65..63740e3824c3 100644 --- a/includes/installer/WebInstallerInstall.php +++ b/includes/installer/WebInstallerInstall.php @@ -81,9 +81,9 @@ class WebInstallerInstall extends WebInstallerPage { if ( $step == 'extension-tables' ) { $this->endLiveBox(); } - $msg = $status->isOk() ? 'config-install-step-done' : 'config-install-step-failed'; + $msg = $status->isOK() ? 'config-install-step-done' : 'config-install-step-failed'; $html = wfMessage( 'word-separator' )->escaped() . wfMessage( $msg )->escaped(); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { $html = "<span class=\"error\">$html</span>"; } $this->addHTML( $html . "</li>\n" ); diff --git a/includes/installer/WebInstallerName.php b/includes/installer/WebInstallerName.php index 556461828db3..dcd30cf2bc10 100644 --- a/includes/installer/WebInstallerName.php +++ b/includes/installer/WebInstallerName.php @@ -73,7 +73,7 @@ class WebInstallerName extends WebInstallerPage { 'label' => '', // @todo Needs a label? 'attribs' => [ 'readonly' => 'readonly', 'class' => 'enabledByOther' ] ] ) . - $this->getFieldSetStart( 'config-admin-box' ) . + $this->getFieldsetStart( 'config-admin-box' ) . $this->parent->getTextBox( [ 'var' => '_AdminName', 'label' => 'config-admin-name', @@ -100,7 +100,7 @@ class WebInstallerName extends WebInstallerPage { 'label' => 'config-subscribe', 'help' => $this->parent->getHelpBox( 'config-subscribe-help' ) ] ) . - $this->getFieldSetEnd() . + $this->getFieldsetEnd() . $this->parent->getInfoBox( wfMessage( 'config-almost-done' )->text() ) . // getRadioSet() builds a set of labeled radio buttons. // For grep: The following messages are used as the item labels: diff --git a/includes/installer/WebInstallerOptions.php b/includes/installer/WebInstallerOptions.php index 7cc5db23bd18..938f77530fb1 100644 --- a/includes/installer/WebInstallerOptions.php +++ b/includes/installer/WebInstallerOptions.php @@ -67,7 +67,7 @@ class WebInstallerOptions extends WebInstallerPage { $this->parent->getHelpBox( 'config-license-help' ) . # E-mail - $this->getFieldSetStart( 'config-email-settings' ) . + $this->getFieldsetStart( 'config-email-settings' ) . $this->parent->getCheckBox( [ 'var' => 'wgEnableEmail', 'label' => 'config-enable-email', @@ -101,11 +101,11 @@ class WebInstallerOptions extends WebInstallerPage { ] ) . $this->parent->getHelpBox( 'config-email-auth-help' ) . "</div>" . - $this->getFieldSetEnd() + $this->getFieldsetEnd() ); $skins = $this->parent->findExtensions( 'skins' ); - $skinHtml = $this->getFieldSetStart( 'config-skins' ); + $skinHtml = $this->getFieldsetStart( 'config-skins' ); $skinNames = array_map( 'strtolower', $skins ); $chosenSkinName = $this->getVar( 'wgDefaultSkin', $this->parent->getDefaultSkin( $skinNames ) ); diff --git a/includes/jobqueue/utils/BacklinkJobUtils.php b/includes/jobqueue/utils/BacklinkJobUtils.php index a81cadefc65c..7f500554bdd6 100644 --- a/includes/jobqueue/utils/BacklinkJobUtils.php +++ b/includes/jobqueue/utils/BacklinkJobUtils.php @@ -116,7 +116,7 @@ class BacklinkJobUtils { foreach ( array_chunk( $titles, $cSize ) as $titleBatch ) { $pages = []; foreach ( $titleBatch as $tl ) { - $pages[$tl->getArticleId()] = [ $tl->getNamespace(), $tl->getDBKey() ]; + $pages[$tl->getArticleID()] = [ $tl->getNamespace(), $tl->getDBkey() ]; } $jobs[] = new $class( $title, // maintain parent job title diff --git a/includes/media/Bitmap_ClientOnly.php b/includes/media/Bitmap_ClientOnly.php index b91fb8aa67e0..56b20acba56d 100644 --- a/includes/media/Bitmap_ClientOnly.php +++ b/includes/media/Bitmap_ClientOnly.php @@ -55,6 +55,6 @@ class BitmapHandler_ClientOnly extends BitmapHandler { return new TransformParameterError( $params ); } - return new ThumbnailImage( $image, $image->getURL(), $image->getLocalRefPath(), $params ); + return new ThumbnailImage( $image, $image->getUrl(), $image->getLocalRefPath(), $params ); } } diff --git a/includes/pager/ReverseChronologicalPager.php b/includes/pager/ReverseChronologicalPager.php index 2c415d684389..31c9c6dcece0 100644 --- a/includes/pager/ReverseChronologicalPager.php +++ b/includes/pager/ReverseChronologicalPager.php @@ -115,7 +115,7 @@ abstract class ReverseChronologicalPager extends IndexPager { // Treat the given time in the wiki timezone and get a UTC timestamp for the database lookup $timestamp = MWTimestamp::getInstance( "${ymd}000000" ); - $timestamp->setTimeZone( $this->getConfig()->get( 'Localtimezone' ) ); + $timestamp->setTimezone( $this->getConfig()->get( 'Localtimezone' ) ); $this->mOffset = $this->mDb->timestamp( $timestamp->getTimestamp() ); } diff --git a/includes/parser/ParserCache.php b/includes/parser/ParserCache.php index bd5afaf033b8..916cfc26a122 100644 --- a/includes/parser/ParserCache.php +++ b/includes/parser/ParserCache.php @@ -64,7 +64,7 @@ class ParserCache { global $wgRequest; // idhash seem to mean 'page id' + 'rendering hash' (r3710) - $pageid = $article->getID(); + $pageid = $article->getId(); $renderkey = (int)( $wgRequest->getVal( 'action' ) == 'render' ); $key = wfMemcKey( 'pcache', 'idhash', "{$pageid}-{$renderkey}!{$hash}" ); @@ -76,7 +76,7 @@ class ParserCache { * @return mixed|string */ protected function getOptionsKey( $article ) { - $pageid = $article->getID(); + $pageid = $article->getId(); return wfMemcKey( 'pcache', 'idoptions', "{$pageid}" ); } diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 5a351a796714..7b8aa4c5f8a7 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -85,7 +85,7 @@ class SpecialContributions extends IncludableSpecialPage { return; } - $id = $userObj->getID(); + $id = $userObj->getId(); if ( $this->opts['contribs'] != 'newbie' ) { $target = $nt->getText(); diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 35861e3dfbe7..7f3eff7317d1 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -79,7 +79,7 @@ class FileDuplicateSearchPage extends QueryPage { } $html[] = $this->closeList(); - $this->getOutput()->addHtml( implode( "\n", $html ) ); + $this->getOutput()->addHTML( implode( "\n", $html ) ); } public function getQueryInfo() { diff --git a/includes/specials/SpecialListDuplicatedFiles.php b/includes/specials/SpecialListDuplicatedFiles.php index ed7e9549d530..49fa417c0e3b 100644 --- a/includes/specials/SpecialListDuplicatedFiles.php +++ b/includes/specials/SpecialListDuplicatedFiles.php @@ -96,12 +96,12 @@ class ListDuplicatedFilesPage extends QueryPage { // Future version might include a list of the first 5 duplicates // perhaps separated by an "↔". $image1 = Title::makeTitle( $result->namespace, $result->title ); - $dupeSearch = SpecialPage::getTitleFor( 'FileDuplicateSearch', $image1->getDBKey() ); + $dupeSearch = SpecialPage::getTitleFor( 'FileDuplicateSearch', $image1->getDBkey() ); $msg = $this->msg( 'listduplicatedfiles-entry' ) ->params( $image1->getText() ) ->numParams( $result->value - 1 ) - ->params( $dupeSearch->getPrefixedDBKey() ); + ->params( $dupeSearch->getPrefixedDBkey() ); return $msg->parse(); } diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index a259ac20081b..57a3d929ad79 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -57,7 +57,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { $outputPage = $this->getOutput(); $title = Title::newFromText( $target ); if ( !$title || $title->isExternal() ) { - $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' ) + $outputPage->addHTML( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' ) ->parse() . '</div>' ); return false; diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index 206e400662b9..c0ed4c994371 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -99,7 +99,7 @@ class SpecialRedirect extends FormSpecialPage { return null; } // Default behavior: Use the direct link to the file. - $url = $file->getURL(); + $url = $file->getUrl(); $request = $this->getRequest(); $width = $request->getInt( 'width', -1 ); $height = $request->getInt( 'height', -1 ); @@ -110,7 +110,7 @@ class SpecialRedirect extends FormSpecialPage { // ... and we can if ( $mto && !$mto->isError() ) { // ... change the URL to point to a thumbnail. - $url = $mto->getURL(); + $url = $mto->getUrl(); } } diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index 559dbd607d4f..cd7a8420f9c5 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -47,7 +47,7 @@ class UploadStashCleanup extends Maintenance { $repo = RepoGroup::singleton()->getLocalRepo(); $tempRepo = $repo->getTempRepo(); - $dbr = $repo->getSlaveDb(); + $dbr = $repo->getSlaveDB(); // how far back should this look for files to delete? $cutoff = time() - $wgUploadStashMaxAge; diff --git a/maintenance/parse.php b/maintenance/parse.php index effed56dcd56..17a8d2ebf4f0 100644 --- a/maintenance/parse.php +++ b/maintenance/parse.php @@ -73,7 +73,7 @@ class CLIParser extends Maintenance { public function execute() { $this->initParser(); - print $this->render( $this->WikiText() ); + print $this->render( $this->Wikitext() ); } /** diff --git a/maintenance/updateSearchIndex.php b/maintenance/updateSearchIndex.php index 8a895f2709a4..cdb7d9f701be 100644 --- a/maintenance/updateSearchIndex.php +++ b/maintenance/updateSearchIndex.php @@ -61,7 +61,7 @@ class UpdateSearchIndex extends Maintenance { } public function execute() { - $posFile = $this->getOption( 'p', 'searchUpdate.' . wfWikiId() . '.pos' ); + $posFile = $this->getOption( 'p', 'searchUpdate.' . wfWikiID() . '.pos' ); $end = $this->getOption( 'e', wfTimestampNow() ); if ( $this->hasOption( 's' ) ) { $start = $this->getOption( 's' ); diff --git a/tests/phpunit/includes/BlockTest.php b/tests/phpunit/includes/BlockTest.php index 35ebf42c2668..f8d2003f1142 100644 --- a/tests/phpunit/includes/BlockTest.php +++ b/tests/phpunit/includes/BlockTest.php @@ -15,7 +15,7 @@ class BlockTest extends MediaWikiLangTestCase { function addDBData() { $user = User::newFromName( 'UTBlockee' ); - if ( $user->getID() == 0 ) { + if ( $user->getId() == 0 ) { $user->addToDatabase(); TestUser::setPasswordForUser( $user, 'UTBlockeePassword' ); @@ -31,7 +31,7 @@ class BlockTest extends MediaWikiLangTestCase { $blockOptions = [ 'address' => 'UTBlockee', - 'user' => $user->getID(), + 'user' => $user->getId(), 'reason' => 'Parce que', 'expiry' => time() + 100500, ]; diff --git a/tests/phpunit/includes/FauxResponseTest.php b/tests/phpunit/includes/FauxResponseTest.php index 85ac4ce0bc4d..eac56fb84160 100644 --- a/tests/phpunit/includes/FauxResponseTest.php +++ b/tests/phpunit/includes/FauxResponseTest.php @@ -69,33 +69,33 @@ class FauxResponseTest extends MediaWikiTestCase { * @covers FauxResponse::header */ public function testHeader() { - $this->assertEquals( null, $this->response->getheader( 'Location' ), 'Non-existing header' ); + $this->assertEquals( null, $this->response->getHeader( 'Location' ), 'Non-existing header' ); $this->response->header( 'Location: http://localhost/' ); $this->assertEquals( 'http://localhost/', - $this->response->getheader( 'Location' ), + $this->response->getHeader( 'Location' ), 'Set header' ); $this->response->header( 'Location: http://127.0.0.1/' ); $this->assertEquals( 'http://127.0.0.1/', - $this->response->getheader( 'Location' ), + $this->response->getHeader( 'Location' ), 'Same header' ); $this->response->header( 'Location: http://127.0.0.2/', false ); $this->assertEquals( 'http://127.0.0.1/', - $this->response->getheader( 'Location' ), + $this->response->getHeader( 'Location' ), 'Same header with override disabled' ); $this->response->header( 'Location: http://localhost/' ); $this->assertEquals( 'http://localhost/', - $this->response->getheader( 'LOCATION' ), + $this->response->getHeader( 'LOCATION' ), 'Get header case insensitive' ); } diff --git a/tests/phpunit/includes/RevisionStorageTest.php b/tests/phpunit/includes/RevisionStorageTest.php index 440495b216dd..42b9beead6e6 100644 --- a/tests/phpunit/includes/RevisionStorageTest.php +++ b/tests/phpunit/includes/RevisionStorageTest.php @@ -95,7 +95,7 @@ class RevisionStorageTest extends MediaWikiTestCase { $rev = new Revision( $props ); - $dbw = wfgetDB( DB_MASTER ); + $dbw = wfGetDB( DB_MASTER ); $rev->insertOn( $dbw ); return $rev; diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 584a368b3695..6048ca78497a 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -48,7 +48,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase { if ( !isset( $this->userUser ) || !( $this->userUser instanceof User ) ) { $this->userUser = User::newFromName( $this->userName ); - if ( !$this->userUser->getID() ) { + if ( !$this->userUser->getId() ) { $this->userUser = User::createNew( $this->userName, [ "email" => "test@example.com", "real_name" => "Test User" ] ); @@ -56,7 +56,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase { } $this->altUser = User::newFromName( $this->altUserName ); - if ( !$this->altUser->getID() ) { + if ( !$this->altUser->getId() ) { $this->altUser = User::createNew( $this->altUserName, [ "email" => "alttest@example.com", "real_name" => "Test User Alt" ] ); diff --git a/tests/phpunit/includes/api/ApiLoginTest.php b/tests/phpunit/includes/api/ApiLoginTest.php index 00701db8b21e..46a3cf4f6450 100644 --- a/tests/phpunit/includes/api/ApiLoginTest.php +++ b/tests/phpunit/includes/api/ApiLoginTest.php @@ -27,7 +27,7 @@ class ApiLoginTest extends ApiTestCase { global $wgServer; $user = self::$users['sysop']; - $user->getUser()->logOut(); + $user->getUser()->logout(); if ( !isset( $wgServer ) ) { $this->markTestIncomplete( 'This test needs $wgServer to be set in LocalSettings.php' ); @@ -72,7 +72,7 @@ class ApiLoginTest extends ApiTestCase { } $user = self::$users['sysop']; - $user->getUser()->logOut(); + $user->getUser()->logout(); $ret = $this->doApiRequest( [ "action" => "login", diff --git a/tests/phpunit/includes/api/UserWrapper.php b/tests/phpunit/includes/api/UserWrapper.php index 1f4e26c834df..9942a0f2d42c 100644 --- a/tests/phpunit/includes/api/UserWrapper.php +++ b/tests/phpunit/includes/api/UserWrapper.php @@ -10,7 +10,7 @@ class UserWrapper { $this->password = $password; $this->user = User::newFromName( $this->userName ); - if ( !$this->user->getID() ) { + if ( !$this->user->getId() ) { $this->user = User::createNew( $this->userName, [ "email" => "test@example.com", "real_name" => "Test User" ] ); diff --git a/tests/phpunit/includes/cache/GenderCacheTest.php b/tests/phpunit/includes/cache/GenderCacheTest.php index 40994da037a3..e329f8d8c5e2 100644 --- a/tests/phpunit/includes/cache/GenderCacheTest.php +++ b/tests/phpunit/includes/cache/GenderCacheTest.php @@ -11,7 +11,7 @@ class GenderCacheTest extends MediaWikiLangTestCase { $this->mergeMwGlobalArrayValue( 'wgDefaultUserOptions', [ 'gender' => 'unknown' ] ); $user = User::newFromName( 'UTMale' ); - if ( $user->getID() == 0 ) { + if ( $user->getId() == 0 ) { $user->addToDatabase(); TestUser::setPasswordForUser( $user, 'UTMalePassword' ); } @@ -20,7 +20,7 @@ class GenderCacheTest extends MediaWikiLangTestCase { $user->saveSettings(); $user = User::newFromName( 'UTFemale' ); - if ( $user->getID() == 0 ) { + if ( $user->getId() == 0 ) { $user->addToDatabase(); TestUser::setPasswordForUser( $user, 'UTFemalePassword' ); } @@ -29,7 +29,7 @@ class GenderCacheTest extends MediaWikiLangTestCase { $user->saveSettings(); $user = User::newFromName( 'UTDefaultGender' ); - if ( $user->getID() == 0 ) { + if ( $user->getId() == 0 ) { $user->addToDatabase(); TestUser::setPasswordForUser( $user, 'UTDefaultGenderPassword' ); } diff --git a/tests/phpunit/includes/context/RequestContextTest.php b/tests/phpunit/includes/context/RequestContextTest.php index c7fba502f82c..32e71e055c3e 100644 --- a/tests/phpunit/includes/context/RequestContextTest.php +++ b/tests/phpunit/includes/context/RequestContextTest.php @@ -91,7 +91,7 @@ class RequestContextTest extends MediaWikiTestCase { MediaWiki\Session\SessionManager::getGlobalSession()->getId(), "Correct context session ID." ); - if ( \MediaWiki\Session\PhpSessionHandler::isEnabled() ) { + if ( \MediaWiki\Session\PHPSessionHandler::isEnabled() ) { $this->assertEquals( $sinfo['sessionId'], session_id(), "Correct context session ID." ); } else { $this->assertEquals( $oldSessionId, session_id(), "Unchanged PHP session ID." ); diff --git a/tests/phpunit/includes/exception/HttpErrorTest.php b/tests/phpunit/includes/exception/HttpErrorTest.php index e7f3a2108e49..90ccd1e551d0 100644 --- a/tests/phpunit/includes/exception/HttpErrorTest.php +++ b/tests/phpunit/includes/exception/HttpErrorTest.php @@ -22,7 +22,7 @@ class HttpErrorTest extends MediaWikiTestCase { */ public function testGetHtml( array $expected, $content, $header ) { $httpError = new HttpError( 500, $content, $header ); - $errorHtml = $httpError->getHtml(); + $errorHtml = $httpError->getHTML(); foreach ( $expected as $key => $html ) { $this->assertContains( $html, $errorHtml, $key ); diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php b/tests/phpunit/includes/filebackend/FileBackendTest.php index bf59ab5034e4..f259c0f171f6 100644 --- a/tests/phpunit/includes/filebackend/FileBackendTest.php +++ b/tests/phpunit/includes/filebackend/FileBackendTest.php @@ -57,7 +57,7 @@ class FileBackendTest extends MediaWikiTestCase { 'name' => 'localtesting', 'lockManager' => LockManagerGroup::singleton()->get( 'fsLockManager' ), 'parallelize' => 'implicit', - 'wikiId' => wfWikiId() . wfRandomString(), + 'wikiId' => wfWikiID() . wfRandomString(), 'backends' => [ [ 'name' => 'localmultitesting1', diff --git a/tests/phpunit/includes/filerepo/file/LocalFileTest.php b/tests/phpunit/includes/filerepo/file/LocalFileTest.php index 9c7040ace483..ffaa2c32bf8f 100644 --- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php +++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php @@ -20,7 +20,7 @@ class LocalFileTest extends MediaWikiTestCase { 'transformVia404' => false, 'backend' => new FSFileBackend( [ 'name' => 'local-backend', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => [ 'cont1' => "/testdir/local-backend/tempimages/cont1", 'cont2' => "/testdir/local-backend/tempimages/cont2" diff --git a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php index 5887d3899775..5042121ccca8 100644 --- a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php +++ b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php @@ -25,7 +25,7 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase { $this->backend = new FSFileBackend( [ 'name' => 'localtesting', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => $containers ] ); $this->repo = new FSRepo( $this->getRepoOptions() ); diff --git a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php index af34282fb316..e28614e89154 100644 --- a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php +++ b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php @@ -42,7 +42,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase { 'Password is shorter than minimal policy' ); $this->assertTrue( - $statusShort->isOk(), + $statusShort->isOK(), 'Password is shorter than minimal policy, not fatal' ); } @@ -67,7 +67,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase { 'Password is shorter than minimum login policy' ); $this->assertFalse( - $statusShort->isOk(), + $statusShort->isOK(), 'Password is shorter than minimum login policy, fatal' ); } @@ -90,7 +90,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase { $this->assertFalse( $statusLong->isGood(), 'Password is longer than maximal policy' ); - $this->assertFalse( $statusLong->isOk(), + $this->assertFalse( $statusLong->isOK(), 'Password is longer than maximal policy, fatal' ); } @@ -111,7 +111,7 @@ class PasswordPolicyChecksTest extends MediaWikiTestCase { 'user' // password ); $this->assertFalse( $statusLong->isGood(), 'Password matches username' ); - $this->assertTrue( $statusLong->isOk(), 'Password matches username, not fatal' ); + $this->assertTrue( $statusLong->isOK(), 'Password matches username, not fatal' ); } /** diff --git a/tests/phpunit/includes/password/UserPasswordPolicyTest.php b/tests/phpunit/includes/password/UserPasswordPolicyTest.php index d820040b7404..d16200beb697 100644 --- a/tests/phpunit/includes/password/UserPasswordPolicyTest.php +++ b/tests/phpunit/includes/password/UserPasswordPolicyTest.php @@ -112,7 +112,7 @@ class UserPasswordPolicyTest extends MediaWikiTestCase { $status = $upp->checkUserPassword( $user, $password ); $this->assertSame( $valid, $status->isGood(), $msg . ' - password valid' ); - $this->assertSame( $ok, $status->isOk(), $msg . ' - can login' ); + $this->assertSame( $ok, $status->isOK(), $msg . ' - can login' ); } public function provideCheckUserPassword() { diff --git a/tests/phpunit/includes/session/SessionManagerTest.php b/tests/phpunit/includes/session/SessionManagerTest.php index a1b9bb44ea8b..cd3177cf6b3c 100644 --- a/tests/phpunit/includes/session/SessionManagerTest.php +++ b/tests/phpunit/includes/session/SessionManagerTest.php @@ -251,7 +251,7 @@ class SessionManagerTest extends MediaWikiTestCase { try { $manager->getSessionForRequest( $request ); $this->fail( 'Expcected exception not thrown' ); - } catch ( \OverFlowException $ex ) { + } catch ( \OverflowException $ex ) { $this->assertStringStartsWith( 'Multiple sessions for this request tied for top priority: ', $ex->getMessage() diff --git a/tests/phpunit/includes/user/LocalIdLookupTest.php b/tests/phpunit/includes/user/LocalIdLookupTest.php index e2b138b67a4a..c86fb6cff3fb 100644 --- a/tests/phpunit/includes/user/LocalIdLookupTest.php +++ b/tests/phpunit/includes/user/LocalIdLookupTest.php @@ -104,11 +104,11 @@ class LocalIdLookupTest extends MediaWikiTestCase { $this->assertTrue( $lookup->isAttached( $user1 ) ); $this->assertFalse( $lookup->isAttached( $user2 ) ); - $wiki = wfWikiId(); + $wiki = wfWikiID(); $this->assertTrue( $lookup->isAttached( $user1, $wiki ) ); $this->assertFalse( $lookup->isAttached( $user2, $wiki ) ); - $wiki = 'not-' . wfWikiId(); + $wiki = 'not-' . wfWikiID(); $this->assertFalse( $lookup->isAttached( $user1, $wiki ) ); $this->assertFalse( $lookup->isAttached( $user2, $wiki ) ); } diff --git a/tests/phpunit/maintenance/backupTextPassTest.php b/tests/phpunit/maintenance/backupTextPassTest.php index e0152165ae73..69a5a7e198e5 100644 --- a/tests/phpunit/maintenance/backupTextPassTest.php +++ b/tests/phpunit/maintenance/backupTextPassTest.php @@ -114,7 +114,7 @@ class TextPassDumperDatabaseTest extends DumpTestCase { $dumper = new TextPassDumper( [ "--stub=file:" . $nameStub, "--output=file:" . $nameFull ] ); $dumper->reporting = false; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->dump( WikiExporter::FULL, WikiExporter::TEXT ); diff --git a/tests/phpunit/maintenance/backup_PageTest.php b/tests/phpunit/maintenance/backup_PageTest.php index 5cd8336ee909..a07e62c9b8ec 100644 --- a/tests/phpunit/maintenance/backup_PageTest.php +++ b/tests/phpunit/maintenance/backup_PageTest.php @@ -104,7 +104,7 @@ class BackupDumperPageTest extends DumpTestCase { $dumper->loadWithArgv( [ '--full', '--quiet', '--output', 'file:' . $fname ] ); $dumper->startId = $this->pageId1; $dumper->endId = $this->pageId4 + 1; - $dumper->setDb( $this->db ); + $dumper->setDB( $this->db ); // Performing the dump $dumper->execute(); diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php index 81e2c6560c27..0945b8f55d7f 100644 --- a/tests/phpunit/skins/SideBarTest.php +++ b/tests/phpunit/skins/SideBarTest.php @@ -78,7 +78,7 @@ class SideBarTest extends MediaWikiLangTestCase { * @covers SkinTemplate::addToSidebarPlain */ public function testExpandMessages() { - $this->assertSidebar( + $this->assertSideBar( [ 'Title' => [ [ 'text' => 'Help', @@ -102,7 +102,7 @@ class SideBarTest extends MediaWikiLangTestCase { 'wgNoFollowDomainExceptions' => [], 'wgNoFollowNsExceptions' => [], ] ); - $this->assertSidebar( + $this->assertSideBar( [ 'Title' => [ # ** http://www.mediawiki.org/| Home [ diff --git a/tests/phpunit/structure/ApiDocumentationTest.php b/tests/phpunit/structure/ApiDocumentationTest.php index 542420a9dc2d..2049e38ba00d 100644 --- a/tests/phpunit/structure/ApiDocumentationTest.php +++ b/tests/phpunit/structure/ApiDocumentationTest.php @@ -65,7 +65,7 @@ class ApiDocumentationTest extends MediaWikiTestCase { RequestContext::getMain()->getConfig(), ] ) ); foreach ( $globals as $k => $v ) { - $this->setMWGlobals( "wg$k", $v ); + $this->setMwGlobals( "wg$k", $v ); } // Fetch module. diff --git a/tests/phpunit/suites/UploadFromUrlTestSuite.php b/tests/phpunit/suites/UploadFromUrlTestSuite.php index e3c5118e7a11..8366369579f3 100644 --- a/tests/phpunit/suites/UploadFromUrlTestSuite.php +++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php @@ -37,7 +37,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite { 'transformVia404' => false, 'backend' => new FSFileBackend( [ 'name' => 'local-backend', - 'wikiId' => wfWikiId(), + 'wikiId' => wfWikiID(), 'containerPaths' => [ 'local-public' => "{$tmpDir}/test-repo/public", 'local-thumb' => "{$tmpDir}/test-repo/thumb", |