From 72fa7b9dfc98878da3644b96a79cec6a03fb16d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thiemo=20M=C3=A4ttig?= Date: Wed, 27 Dec 2017 12:33:38 +0100 Subject: [PATCH] Fix inconsistent capitalization of different method calls Change-Id: I9f5b9e59e8cdadf65e80077fe2d3a9822b4592fe --- includes/api/ApiEmailUser.php | 2 +- includes/api/ApiTag.php | 2 +- includes/specials/SpecialUncategorizedcategories.php | 2 +- tests/phpunit/includes/RevisionTest.php | 2 +- tests/phpunit/includes/api/ApiComparePagesTest.php | 2 +- tests/phpunit/includes/api/ApiParseTest.php | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php index edea2661a2..84ea2662d3 100644 --- a/includes/api/ApiEmailUser.php +++ b/includes/api/ApiEmailUser.php @@ -71,7 +71,7 @@ class ApiEmailUser extends ApiBase { } $result = array_filter( [ - 'result' => $retval->isGood() ? 'Success' : ( $retval->isOk() ? 'Warnings' : 'Failure' ), + 'result' => $retval->isGood() ? 'Success' : ( $retval->isOK() ? 'Warnings' : 'Failure' ), 'warnings' => $this->getErrorFormatter()->arrayFromStatus( $retval, 'warning' ), 'errors' => $this->getErrorFormatter()->arrayFromStatus( $retval, 'error' ), ] ); diff --git a/includes/api/ApiTag.php b/includes/api/ApiTag.php index 9304c2b414..c9f6db3994 100644 --- a/includes/api/ApiTag.php +++ b/includes/api/ApiTag.php @@ -39,7 +39,7 @@ class ApiTag extends ApiBase { // Check if user can add tags if ( $params['tags'] ) { $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $params['tags'], $user ); - if ( !$ableToTag->isOk() ) { + if ( !$ableToTag->isOK() ) { $this->dieStatus( $ableToTag ); } } diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index 5ff9e04ef7..2dcb77f824 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -60,7 +60,7 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage { $title = Title::makeTitleSafe( NS_CATEGORY, $titleStr ); } if ( $title ) { - $this->exceptionList[] = $title->getDBKey(); + $this->exceptionList[] = $title->getDBkey(); } } } diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index 80257cca8b..0db76ff193 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -43,7 +43,7 @@ class RevisionTest extends MediaWikiTestCase { ->method( 'getPrefixedText' ) ->will( $this->returnValue( 'RevisionTest' ) ); $mock->expects( $this->any() ) - ->method( 'getDBKey' ) + ->method( 'getDBkey' ) ->will( $this->returnValue( 'RevisionTest' ) ); $mock->expects( $this->any() ) ->method( 'getArticleID' ) diff --git a/tests/phpunit/includes/api/ApiComparePagesTest.php b/tests/phpunit/includes/api/ApiComparePagesTest.php index 989d6bb536..9399ef8ea8 100644 --- a/tests/phpunit/includes/api/ApiComparePagesTest.php +++ b/tests/phpunit/includes/api/ApiComparePagesTest.php @@ -29,7 +29,7 @@ class ApiComparePagesTest extends ApiTestCase { $status = $page->doEditContent( $content, 'Test for ApiComparePagesTest: ' . $text, 0, false, $user ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { $this->fail( "Failed to create $title: " . $status->getWikiText( false, false, 'en' ) ); } return $status->value['revision']->getId(); diff --git a/tests/phpunit/includes/api/ApiParseTest.php b/tests/phpunit/includes/api/ApiParseTest.php index 07bf299093..e236437722 100644 --- a/tests/phpunit/includes/api/ApiParseTest.php +++ b/tests/phpunit/includes/api/ApiParseTest.php @@ -21,7 +21,7 @@ class ApiParseTest extends ApiTestCase { ContentHandler::makeContent( 'Test for revdel', $title, CONTENT_MODEL_WIKITEXT ), __METHOD__ . ' Test for revdel', 0, false, $user ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { $this->fail( "Failed to create $title: " . $status->getWikiText( false, false, 'en' ) ); } self::$pageId = $status->value['revision']->getPage(); @@ -31,7 +31,7 @@ class ApiParseTest extends ApiTestCase { ContentHandler::makeContent( 'Test for oldid', $title, CONTENT_MODEL_WIKITEXT ), __METHOD__ . ' Test for oldid', 0, false, $user ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { $this->fail( "Failed to edit $title: " . $status->getWikiText( false, false, 'en' ) ); } self::$revIds['oldid'] = $status->value['revision']->getId(); @@ -40,7 +40,7 @@ class ApiParseTest extends ApiTestCase { ContentHandler::makeContent( 'Test for latest', $title, CONTENT_MODEL_WIKITEXT ), __METHOD__ . ' Test for latest', 0, false, $user ); - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { $this->fail( "Failed to edit $title: " . $status->getWikiText( false, false, 'en' ) ); } self::$revIds['latest'] = $status->value['revision']->getId(); -- 2.20.1