jenkins-bot has submitted this change and it was merged. Change subject: Control for namespace settings in NoLangLinkHandlerTest ......................................................................
Control for namespace settings in NoLangLinkHandlerTest the test fails for me on my repo, due to my settings. Change-Id: I03e9d90bb0877b4538503096e719089c405ef85b --- M client/tests/phpunit/includes/Hooks/NoLangLinkHandlerTest.php 1 file changed, 28 insertions(+), 0 deletions(-) Approvals: Hoo man: Looks good to me, approved jenkins-bot: Verified diff --git a/client/tests/phpunit/includes/Hooks/NoLangLinkHandlerTest.php b/client/tests/phpunit/includes/Hooks/NoLangLinkHandlerTest.php index 4392e7c..a55107d 100644 --- a/client/tests/phpunit/includes/Hooks/NoLangLinkHandlerTest.php +++ b/client/tests/phpunit/includes/Hooks/NoLangLinkHandlerTest.php @@ -5,6 +5,7 @@ use Parser; use ParserOptions; use ParserOutput; +use Wikibase\Client\WikibaseClient; use Wikibase\NamespaceChecker; use Wikibase\NoLangLinkHandler; @@ -20,6 +21,33 @@ */ class NoLangLinkHandlerTest extends \PHPUnit_Framework_TestCase { + /** + * @var int[] + */ + private $excludeNamespaces; + + /** + * @var int[] + */ + private $namespacesToInclude; + + protected function setUp() { + $settings = WikibaseClient::getDefaultInstance()->getSettings(); + + $this->excludeNamespaces = $settings->getSetting( 'excludeNamespaces' ); + $this->namespacesToInclude = $settings->getSetting( 'namespaces' ); + + $settings->setSetting( 'excludeNamespaces', array() ); + $settings->setSetting( 'namespaces', array() ); + } + + protected function tearDown() { + $settings = WikibaseClient::getDefaultInstance()->getSettings(); + + $settings->setSetting( 'excludeNamespaces', $this->excludeNamespaces ); + $settings->setSetting( 'namespaces', $this->namespacesToInclude ); + } + public function testGetSetNoExternalLangLinks() { $pout = new ParserOutput(); $list = array( 'xy', 'abc' ); -- To view, visit https://gerrit.wikimedia.org/r/188379 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03e9d90bb0877b4538503096e719089c405ef85b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Hoo man <h...@online.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits