jenkins-bot has submitted this change and it was merged.

Change subject: Make ReferencedEntitiesDataUpdaterTest pass with Items in main 
namespace
......................................................................


Make ReferencedEntitiesDataUpdaterTest pass with Items in main namespace

This test fails when running on a repo where Items are in the main
namespace.

Yes, this clearly qualifies as a hack. I'm faking *some* valid JSON
content, but it is disjoint from the actual page name. This is fine for
this test, because all it cares about in the end is if the *page* exists.
The actual content is never checked. Not even the content type.

With this hack the test will succeed in all cases where the main
namespace is either wikitext or contains Items.

Please do not block this patch just because you have a better idea.
Submit your idea as a follow-up please.

Change-Id: I863ee7210d2b1ad3813558323a54ea1ccdcde388
---
M repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Adrian Lang: Looks good to me, approved
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
 
b/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
index 80af7ad..9b3c6b9 100644
--- 
a/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
+++ 
b/repo/tests/phpunit/includes/ParserOutput/ReferencedEntitiesDataUpdaterTest.php
@@ -31,7 +31,7 @@
                parent::setUp();
 
                foreach ( array( 'P1', 'Q1', 'Q20', 'Q21', 'Q22' ) as $pageName 
) {
-                       $this->insertPage( $pageName );
+                       $this->insertPage( $pageName, '{ "type": "item", "id": 
"Q1" }' );
                }
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I863ee7210d2b1ad3813558323a54ea1ccdcde388
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: Adrian Lang <adrian.he...@wikimedia.de>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to