Jeroen De Dauw has submitted this change and it was merged.
Change subject: Fix EditEntityActionTest if run on a repo+client wiki
......................................................................
Fix EditEntityActionTest if run on a repo+client wiki
This errors in ClientHooks::onOutputPageParserOutput if run
isolated.
Change-Id: I7904656f4d175668eeb31baa2b365da1ee1f6385
---
M repo/tests/phpunit/includes/actions/EditEntityActionTest.php
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Jeroen De Dauw: Looks good to me, approved
diff --git a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
index e1265bc..cd04434 100644
--- a/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
+++ b/repo/tests/phpunit/includes/actions/EditEntityActionTest.php
@@ -5,9 +5,9 @@
use MWException;
use User;
use Wikibase\NamespaceUtils;
-use Wikibase\SiteLink;
use WikiPage;
use Title;
+use TestSites;
/**
* @covers EditEntityAction
@@ -42,6 +42,12 @@
$user->setName( '127.0.0.1' );
}
+ static $hasTitles = false;
+ if ( !$hasTitles ) {
+ TestSites::insertIntoDb();
+ $hasTitles = true;
+ }
+
$this->setMwGlobals( 'wgUser', $user );
}
--
To view, visit https://gerrit.wikimedia.org/r/101147
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7904656f4d175668eeb31baa2b365da1ee1f6385
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits