Daniel Kinzler has uploaded a new change for review.

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

Change subject: Rename ParserAfterParseHookHandler to LinkInjectionHookHandlers
......................................................................

Rename ParserAfterParseHookHandler to LinkInjectionHookHandlers

Change-Id: I5f73f0944e55ecdaa3342e5cacedb58cafaeb04a
---
M client/WikibaseClient.php
R client/includes/Hooks/LinkInjectionHookHandlers.php
R client/tests/phpunit/includes/Hooks/LinkInjectionHookHandlersTest.php
3 files changed, 13 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/72/212272/1

diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index b61a0fc..114e7b3 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -92,7 +92,7 @@
        $wgHooks['OldChangesListRecentChangesLine'][]           = 
'\Wikibase\ClientHooks::onOldChangesListRecentChangesLine';
        $wgHooks['OutputPageParserOutput'][]            = 
'\Wikibase\Client\Hooks\SidebarHookHandlers::onOutputPageParserOutput';
        $wgHooks['SkinTemplateGetLanguageLink'][]               = 
'\Wikibase\Client\Hooks\SidebarHookHandlers::onSkinTemplateGetLanguageLink';
-       $wgHooks['ParserAfterParse'][]                          = 
'\Wikibase\Client\Hooks\ParserAfterParseHookHandler::onParserAfterParse';
+       $wgHooks['ParserAfterParse'][]                          = 
'\Wikibase\Client\Hooks\LinkInjectionHookHandlers::onParserAfterParse';
        $wgHooks['SidebarBeforeOutput'][] = 
'\Wikibase\Client\Hooks\SidebarHookHandlers::onSidebarBeforeOutput';
        $wgHooks['ArticleEditUpdates'][]                                = 
'\Wikibase\Client\Hooks\DataUpdateHookHandlers::onArticleEditUpdates';
        $wgHooks['ArticleDeleteComplete'][]                             = 
'\Wikibase\Client\Hooks\DataUpdateHookHandlers::onArticleDeleteComplete';
diff --git a/client/includes/Hooks/ParserAfterParseHookHandler.php 
b/client/includes/Hooks/LinkInjectionHookHandlers.php
similarity index 97%
rename from client/includes/Hooks/ParserAfterParseHookHandler.php
rename to client/includes/Hooks/LinkInjectionHookHandlers.php
index f192897..cacf6ef 100644
--- a/client/includes/Hooks/ParserAfterParseHookHandler.php
+++ b/client/includes/Hooks/LinkInjectionHookHandlers.php
@@ -19,7 +19,7 @@
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  * @author Marius Hoch < h...@online.de >
  */
-class ParserAfterParseHookHandler {
+class LinkInjectionHookHandlers {
 
        /**
         * @var NamespaceChecker
@@ -54,7 +54,7 @@
                        $settings->getSetting( 'sortPrepend' )
                );
 
-               return new ParserAfterParseHookHandler(
+               return new LinkInjectionHookHandlers(
                        $wikibaseClient->getNamespaceChecker(),
                        $wikibaseClient->getLangLinkHandler(),
                        $interwikiSorter,
diff --git 
a/client/tests/phpunit/includes/Hooks/ParserAfterParseHookHandlerTest.php 
b/client/tests/phpunit/includes/Hooks/LinkInjectionHookHandlersTest.php
similarity index 93%
rename from 
client/tests/phpunit/includes/Hooks/ParserAfterParseHookHandlerTest.php
rename to client/tests/phpunit/includes/Hooks/LinkInjectionHookHandlersTest.php
index 14ad1d6..4f34ccf 100644
--- a/client/tests/phpunit/includes/Hooks/ParserAfterParseHookHandlerTest.php
+++ b/client/tests/phpunit/includes/Hooks/LinkInjectionHookHandlersTest.php
@@ -14,7 +14,7 @@
 use Title;
 use Wikibase\Client\Hooks\LanguageLinkBadgeDisplay;
 use Wikibase\Client\Hooks\OtherProjectsSidebarGeneratorFactory;
-use Wikibase\Client\Hooks\ParserAfterParseHookHandler;
+use Wikibase\Client\Hooks\LinkInjectionHookHandlers;
 use Wikibase\Client\Usage\EntityUsage;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\DataModel\Entity\Item;
@@ -30,7 +30,7 @@
 use Wikibase\Test\MockSiteStore;
 
 /**
- * @covers Wikibase\Client\Hooks\ParserAfterParseHookHandler
+ * @covers Wikibase\Client\Hooks\LinkInjectionHookHandlers
  *
  * @group WikibaseClient
  * @group Wikibase
@@ -39,7 +39,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Kinzler
  */
-class ParserAfterParseHookHandlerTest extends MediaWikiTestCase {
+class LinkInjectionHookHandlersTest extends MediaWikiTestCase {
 
        /**
         * @param string $globalId
@@ -140,7 +140,7 @@
                return new SettingsArray( array_merge( $defaults, $settings ) );
        }
 
-       private function newParserAfterParseHookHandler( array $settings = 
array() ) {
+       private function newLinkInjectionHookHandlers( array $settings = 
array() ) {
                $badgeId = $this->getBadgeItem()->getId();
 
                $links = array(
@@ -187,7 +187,7 @@
                        $settings->getSetting( 'sortPrepend' )
                );
 
-               return new ParserAfterParseHookHandler(
+               return new LinkInjectionHookHandlers(
                        $namespaceChecker,
                        $langLinkHandler,
                        $interwikiSorter,
@@ -234,8 +234,8 @@
                $oldSiteGroupValue = $settings->getSetting( 'siteGroup' );
                $settings->setSetting( 'siteGroup', 'NYAN' );
 
-               $handler = ParserAfterParseHookHandler::newFromGlobalState();
-               $this->assertInstanceOf( 
'Wikibase\Client\Hooks\ParserAfterParseHookHandler', $handler );
+               $handler = LinkInjectionHookHandlers::newFromGlobalState();
+               $this->assertInstanceOf( 
'Wikibase\Client\Hooks\LinkInjectionHookHandlers', $handler );
 
                $settings->setSetting( 'siteGroup', $oldSiteGroupValue );
        }
@@ -304,7 +304,7 @@
                $expectedBadges
        ) {
                $parser = $this->newParser( $title, $pagePropsBefore, array() );
-               $handler = $this->newParserAfterParseHookHandler();
+               $handler = $this->newLinkInjectionHookHandlers();
 
                $handler->doParserAfterParse( $parser );
 
@@ -335,7 +335,7 @@
         * @see https://bugzilla.wikimedia.org/show_bug.cgi?id=71772
         */
        public function testOnParserAfterParse_withoutParameters() {
-               $this->assertTrue( 
ParserAfterParseHookHandler::onParserAfterParse() );
+               $this->assertTrue( 
LinkInjectionHookHandlers::onParserAfterParse() );
        }
 
        public function parserAfterParseProvider_noItem() {
@@ -354,7 +354,7 @@
         */
        public function testDoParserAfterParse_noItem( Title $title ) {
                $parser = $this->newParser( $title, array(), array() );
-               $handler = $this->newParserAfterParseHookHandler();
+               $handler = $this->newLinkInjectionHookHandlers();
 
                $text = '';
                $stripState = new StripState( 'x' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f73f0944e55ecdaa3342e5cacedb58cafaeb04a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to