Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/278277

Change subject: Fix numerous class/function casing
......................................................................

Fix numerous class/function casing

Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715
---
M includes/db/DatabaseMysqli.php
M includes/htmlform/HTMLTitleTextField.php
M includes/htmlform/HTMLUserTextField.php
M includes/import/WikiImporter.php
M includes/installer/WebInstallerComplete.php
M includes/installer/WebInstallerInstall.php
M includes/installer/WebInstallerName.php
M includes/installer/WebInstallerOptions.php
M includes/jobqueue/utils/BacklinkJobUtils.php
M includes/media/Bitmap_ClientOnly.php
M includes/pager/ReverseChronologicalPager.php
M includes/parser/ParserCache.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialFileDuplicateSearch.php
M includes/specials/SpecialListDuplicatedFiles.php
M includes/specials/SpecialRecentchangeslinked.php
M includes/specials/SpecialRedirect.php
M maintenance/cleanupUploadStash.php
M maintenance/parse.php
M maintenance/updateSearchIndex.php
M tests/phpunit/includes/BlockTest.php
M tests/phpunit/includes/FauxResponseTest.php
M tests/phpunit/includes/RevisionStorageTest.php
M tests/phpunit/includes/TitlePermissionTest.php
M tests/phpunit/includes/api/ApiLoginTest.php
M tests/phpunit/includes/api/UserWrapper.php
M tests/phpunit/includes/cache/GenderCacheTest.php
M tests/phpunit/includes/context/RequestContextTest.php
M tests/phpunit/includes/exception/HttpErrorTest.php
M tests/phpunit/includes/filebackend/FileBackendTest.php
M tests/phpunit/includes/filerepo/file/LocalFileTest.php
M tests/phpunit/includes/media/MediaWikiMediaTestCase.php
M tests/phpunit/includes/password/PasswordPolicyChecksTest.php
M tests/phpunit/includes/password/UserPasswordPolicyTest.php
M tests/phpunit/includes/session/SessionManagerTest.php
M tests/phpunit/includes/user/LocalIdLookupTest.php
M tests/phpunit/maintenance/backupTextPassTest.php
M tests/phpunit/maintenance/backup_PageTest.php
M tests/phpunit/skins/SideBarTest.php
M tests/phpunit/structure/ApiDocumentationTest.php
M tests/phpunit/suites/UploadFromUrlTestSuite.php
41 files changed, 63 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/77/278277/1

diff --git a/includes/db/DatabaseMysqli.php b/includes/db/DatabaseMysqli.php
index 8ca2362..d45805a 100644
--- a/includes/db/DatabaseMysqli.php
+++ b/includes/db/DatabaseMysqli.php
@@ -322,7 +322,7 @@
         * @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 410d15d..fcf721a 100644
--- a/includes/htmlform/HTMLTitleTextField.php
+++ b/includes/htmlform/HTMLTitleTextField.php
@@ -86,7 +86,7 @@
                $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 92b35a8..5a7e0b9 100644
--- a/includes/htmlform/HTMLUserTextField.php
+++ b/includes/htmlform/HTMLUserTextField.php
@@ -51,6 +51,6 @@
                $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 b6740d2..98ae34f 100644
--- a/includes/import/WikiImporter.php
+++ b/includes/import/WikiImporter.php
@@ -604,7 +604,7 @@
                $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 ffab9bb..11a1833 100644
--- a/includes/installer/WebInstallerComplete.php
+++ b/includes/installer/WebInstallerComplete.php
@@ -24,12 +24,12 @@
        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 9d0d680..63740e3 100644
--- a/includes/installer/WebInstallerInstall.php
+++ b/includes/installer/WebInstallerInstall.php
@@ -81,9 +81,9 @@
                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 5564618..dcd30cf 100644
--- a/includes/installer/WebInstallerName.php
+++ b/includes/installer/WebInstallerName.php
@@ -73,7 +73,7 @@
                                '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 @@
                                '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 7cc5db2..938f775 100644
--- a/includes/installer/WebInstallerOptions.php
+++ b/includes/installer/WebInstallerOptions.php
@@ -67,7 +67,7 @@
                        $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 @@
                        ] ) .
                        $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 a81cade..7f50055 100644
--- a/includes/jobqueue/utils/BacklinkJobUtils.php
+++ b/includes/jobqueue/utils/BacklinkJobUtils.php
@@ -116,7 +116,7 @@
                        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 b91fb8a..56b20ac 100644
--- a/includes/media/Bitmap_ClientOnly.php
+++ b/includes/media/Bitmap_ClientOnly.php
@@ -55,6 +55,6 @@
                        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 2c415d6..31c9c6d 100644
--- a/includes/pager/ReverseChronologicalPager.php
+++ b/includes/pager/ReverseChronologicalPager.php
@@ -115,7 +115,7 @@
 
                // 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 bd5afaf..916cfc2 100644
--- a/includes/parser/ParserCache.php
+++ b/includes/parser/ParserCache.php
@@ -64,7 +64,7 @@
                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 @@
         * @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 5a351a7..7b8aa4c 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -85,7 +85,7 @@
 
                        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 35861e3..7f3eff7 100644
--- a/includes/specials/SpecialFileDuplicateSearch.php
+++ b/includes/specials/SpecialFileDuplicateSearch.php
@@ -79,7 +79,7 @@
                }
                $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 ed7e954..49fa417 100644
--- a/includes/specials/SpecialListDuplicatedFiles.php
+++ b/includes/specials/SpecialListDuplicatedFiles.php
@@ -96,12 +96,12 @@
                // 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 a259ac2..57a3d92 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -57,7 +57,7 @@
                $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 206e400..c0ed4c9 100644
--- a/includes/specials/SpecialRedirect.php
+++ b/includes/specials/SpecialRedirect.php
@@ -99,7 +99,7 @@
                        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 @@
                        // ... 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 559dbd6..cd7a842 100644
--- a/maintenance/cleanupUploadStash.php
+++ b/maintenance/cleanupUploadStash.php
@@ -47,7 +47,7 @@
                $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 effed56..17a8d2e 100644
--- a/maintenance/parse.php
+++ b/maintenance/parse.php
@@ -73,7 +73,7 @@
 
        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 8a895f2..cdb7d9f 100644
--- a/maintenance/updateSearchIndex.php
+++ b/maintenance/updateSearchIndex.php
@@ -61,7 +61,7 @@
        }
 
        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 35ebf42..f8d2003 100644
--- a/tests/phpunit/includes/BlockTest.php
+++ b/tests/phpunit/includes/BlockTest.php
@@ -15,7 +15,7 @@
 
        function addDBData() {
                $user = User::newFromName( 'UTBlockee' );
-               if ( $user->getID() == 0 ) {
+               if ( $user->getId() == 0 ) {
                        $user->addToDatabase();
                        TestUser::setPasswordForUser( $user, 
'UTBlockeePassword' );
 
@@ -31,7 +31,7 @@
 
                $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 85ac4ce..eac56fb 100644
--- a/tests/phpunit/includes/FauxResponseTest.php
+++ b/tests/phpunit/includes/FauxResponseTest.php
@@ -69,33 +69,33 @@
         * @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 440495b..42b9bee 100644
--- a/tests/phpunit/includes/RevisionStorageTest.php
+++ b/tests/phpunit/includes/RevisionStorageTest.php
@@ -95,7 +95,7 @@
 
                $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 584a368..6048ca7 100644
--- a/tests/phpunit/includes/TitlePermissionTest.php
+++ b/tests/phpunit/includes/TitlePermissionTest.php
@@ -48,7 +48,7 @@
                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" => "[email protected]",
                                        "real_name" => "Test User" ] );
@@ -56,7 +56,7 @@
                        }
 
                        $this->altUser = User::newFromName( $this->altUserName 
);
-                       if ( !$this->altUser->getID() ) {
+                       if ( !$this->altUser->getId() ) {
                                $this->altUser = User::createNew( 
$this->altUserName, [
                                        "email" => "[email protected]",
                                        "real_name" => "Test User Alt" ] );
diff --git a/tests/phpunit/includes/api/ApiLoginTest.php 
b/tests/phpunit/includes/api/ApiLoginTest.php
index 00701db..46a3cf4 100644
--- a/tests/phpunit/includes/api/ApiLoginTest.php
+++ b/tests/phpunit/includes/api/ApiLoginTest.php
@@ -27,7 +27,7 @@
                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 @@
                }
 
                $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 1f4e26c..9942a0f 100644
--- a/tests/phpunit/includes/api/UserWrapper.php
+++ b/tests/phpunit/includes/api/UserWrapper.php
@@ -10,7 +10,7 @@
                $this->password = $password;
 
                $this->user = User::newFromName( $this->userName );
-               if ( !$this->user->getID() ) {
+               if ( !$this->user->getId() ) {
                        $this->user = User::createNew( $this->userName, [
                                "email" => "[email protected]",
                                "real_name" => "Test User" ] );
diff --git a/tests/phpunit/includes/cache/GenderCacheTest.php 
b/tests/phpunit/includes/cache/GenderCacheTest.php
index 40994da..e329f8d 100644
--- a/tests/phpunit/includes/cache/GenderCacheTest.php
+++ b/tests/phpunit/includes/cache/GenderCacheTest.php
@@ -11,7 +11,7 @@
                $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 @@
                $user->saveSettings();
 
                $user = User::newFromName( 'UTFemale' );
-               if ( $user->getID() == 0 ) {
+               if ( $user->getId() == 0 ) {
                        $user->addToDatabase();
                        TestUser::setPasswordForUser( $user, 'UTFemalePassword' 
);
                }
@@ -29,7 +29,7 @@
                $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 c7fba50..32e71e0 100644
--- a/tests/phpunit/includes/context/RequestContextTest.php
+++ b/tests/phpunit/includes/context/RequestContextTest.php
@@ -91,7 +91,7 @@
                        
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 e7f3a21..90ccd1e 100644
--- a/tests/phpunit/includes/exception/HttpErrorTest.php
+++ b/tests/phpunit/includes/exception/HttpErrorTest.php
@@ -22,7 +22,7 @@
         */
        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 bf59ab5..f259c0f 100644
--- a/tests/phpunit/includes/filebackend/FileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendTest.php
@@ -57,7 +57,7 @@
                        '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 9c7040a..ffaa2c3 100644
--- a/tests/phpunit/includes/filerepo/file/LocalFileTest.php
+++ b/tests/phpunit/includes/filerepo/file/LocalFileTest.php
@@ -20,7 +20,7 @@
                        '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 5887d38..5042121 100644
--- a/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
+++ b/tests/phpunit/includes/media/MediaWikiMediaTestCase.php
@@ -25,7 +25,7 @@
 
                $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 af34282..e28614e 100644
--- a/tests/phpunit/includes/password/PasswordPolicyChecksTest.php
+++ b/tests/phpunit/includes/password/PasswordPolicyChecksTest.php
@@ -42,7 +42,7 @@
                        'Password is shorter than minimal policy'
                );
                $this->assertTrue(
-                       $statusShort->isOk(),
+                       $statusShort->isOK(),
                        'Password is shorter than minimal policy, not fatal'
                );
        }
@@ -67,7 +67,7 @@
                        '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 @@
                $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 @@
                        '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 d820040..d16200b 100644
--- a/tests/phpunit/includes/password/UserPasswordPolicyTest.php
+++ b/tests/phpunit/includes/password/UserPasswordPolicyTest.php
@@ -112,7 +112,7 @@
 
                $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 a1b9bb4..cd3177c 100644
--- a/tests/phpunit/includes/session/SessionManagerTest.php
+++ b/tests/phpunit/includes/session/SessionManagerTest.php
@@ -251,7 +251,7 @@
                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 e2b138b..c86fb6c 100644
--- a/tests/phpunit/includes/user/LocalIdLookupTest.php
+++ b/tests/phpunit/includes/user/LocalIdLookupTest.php
@@ -104,11 +104,11 @@
                $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 e015216..69a5a7e 100644
--- a/tests/phpunit/maintenance/backupTextPassTest.php
+++ b/tests/phpunit/maintenance/backupTextPassTest.php
@@ -114,7 +114,7 @@
                $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 5cd8336..a07e62c 100644
--- a/tests/phpunit/maintenance/backup_PageTest.php
+++ b/tests/phpunit/maintenance/backup_PageTest.php
@@ -104,7 +104,7 @@
                $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 81e2c65..0945b8f 100644
--- a/tests/phpunit/skins/SideBarTest.php
+++ b/tests/phpunit/skins/SideBarTest.php
@@ -78,7 +78,7 @@
         * @covers SkinTemplate::addToSidebarPlain
         */
        public function testExpandMessages() {
-               $this->assertSidebar(
+               $this->assertSideBar(
                        [ 'Title' => [
                                [
                                        'text' => 'Help',
@@ -102,7 +102,7 @@
                        '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 542420a..2049e38 100644
--- a/tests/phpunit/structure/ApiDocumentationTest.php
+++ b/tests/phpunit/structure/ApiDocumentationTest.php
@@ -65,7 +65,7 @@
                        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 e3c5118..8366369 100644
--- a/tests/phpunit/suites/UploadFromUrlTestSuite.php
+++ b/tests/phpunit/suites/UploadFromUrlTestSuite.php
@@ -37,7 +37,7 @@
                        '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",

-- 
To view, visit https://gerrit.wikimedia.org/r/278277
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23982bfa0548c9ea3bdb432be7982f1563930715
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to