Mglaser has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351797 )

Change subject: Unittests: make test cache proof
......................................................................

Unittests: make test cache proof

Creating a clean namespace fixture was broken when caching is enabled.
This commit fixes that by resetting the previously cached namespace
information.

Change-Id: Ica95df1c555dc25edcfcb8cabc854f5473984896
---
M NamespaceManager/tests/phpunit/BSApiNamespaceStoreTest.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/97/351797/1

diff --git a/NamespaceManager/tests/phpunit/BSApiNamespaceStoreTest.php 
b/NamespaceManager/tests/phpunit/BSApiNamespaceStoreTest.php
index 7864ce2..b6e4679 100644
--- a/NamespaceManager/tests/phpunit/BSApiNamespaceStoreTest.php
+++ b/NamespaceManager/tests/phpunit/BSApiNamespaceStoreTest.php
@@ -41,6 +41,7 @@
        }
 
        protected function setUp() {
+               global $wgContLang;
                parent::setUp();
                $this->setMwGlobals( [
                        'wgNamespacesWithSubpages' => [
@@ -76,6 +77,8 @@
                        ];
                        return true;
                });
+               // Clear any previous cached namespaces. Important if caching 
is enabled
+               $wgContLang->resetNamespaces();
        }
 
        protected function createStoreFixtureData() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica95df1c555dc25edcfcb8cabc854f5473984896
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to