[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.28.0-wmf.21]: Add EntityHandler::supportsCategories
jenkins-bot has submitted this change and it was merged. Change subject: Add EntityHandler::supportsCategories .. Add EntityHandler::supportsCategories Bug: T126977 Change-Id: Ia18c101a21af23b1536a5f86faab421e6137640c (cherry picked from commit 010d446c2d3db4fb220fb5dd4bc000452bafa8bd) --- M repo/includes/Content/EntityHandler.php M repo/tests/phpunit/includes/Content/EntityHandlerTest.php 2 files changed, 13 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified 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/315074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia18c101a21af23b1536a5f86faab421e6137640c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: wmf/1.28.0-wmf.21 Gerrit-Owner: Hoo manGerrit-Reviewer: Hoo man Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.28.0-wmf.21]: Add EntityHandler::supportsCategories
Hoo man has uploaded a new change for review. https://gerrit.wikimedia.org/r/315074 Change subject: Add EntityHandler::supportsCategories .. Add EntityHandler::supportsCategories Bug: T126977 Change-Id: Ia18c101a21af23b1536a5f86faab421e6137640c (cherry picked from commit 010d446c2d3db4fb220fb5dd4bc000452bafa8bd) --- 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/74/315074/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/315074 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: wmf/1.28.0-wmf.21 Gerrit-Owner: Hoo man___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits