Thiemo Mättig (WMDE) has uploaded a new change for review.

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

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(-)


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

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: newchange
Gerrit-Change-Id: I863ee7210d2b1ad3813558323a54ea1ccdcde388
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

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

Reply via email to