Hoo man has uploaded a new change for review.

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

Change subject: Add EntityHandler::supportsCategories
......................................................................

Add EntityHandler::supportsCategories

Bug: T126977
Change-Id: Ia18c101a21af23b1536a5f86faab421e6137640c
---
M repo/includes/Content/EntityHandler.php
M repo/tests/phpunit/includes/Content/EntityHandlerTest.php
2 files changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/repo/includes/Content/EntityHandler.php 
b/repo/includes/Content/EntityHandler.php
index c335f08..ac57e82 100644
--- a/repo/includes/Content/EntityHandler.php
+++ b/repo/includes/Content/EntityHandler.php
@@ -279,6 +279,15 @@
        }
 
        /**
+        * None of the Entity content models support categories.
+        *
+        * @return bool Always false.
+        */
+       public function supportsCategories() {
+               return false;
+       }
+
+       /**
         * @see ContentHandler::makeRedirectContent
         *
         * @warn Always throws an MWException, since an EntityRedirects needs 
to know it's own
diff --git a/repo/tests/phpunit/includes/Content/EntityHandlerTest.php 
b/repo/tests/phpunit/includes/Content/EntityHandlerTest.php
index bffad59..192a4ff 100644
--- a/repo/tests/phpunit/includes/Content/EntityHandlerTest.php
+++ b/repo/tests/phpunit/includes/Content/EntityHandlerTest.php
@@ -502,4 +502,8 @@
                $this->assertContains( '(wikibase-noentity)', 
$context->getOutput()->getHTML() );
        }
 
+       public function testSupportsCategories() {
+               $this->assertFalse( $this->getHandler()->supportsCategories() );
+       }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia18c101a21af23b1536a5f86faab421e6137640c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>

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

Reply via email to