Umherirrender has uploaded a new change for review.

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

Change subject: Stash wgTitle in edit page and parse api test
......................................................................

Stash wgTitle in edit page and parse api test

Also for ApiWatchTest::testWatchEdit, because it calls the api edit
module

They get set by the api modules and therefor needs to be recovered on
tear down.

Change-Id: I8ee0c1ba6abb85cb48de41402e6e3599e0d6eba8
---
M tests/phpunit/includes/api/ApiEditPageTest.php
M tests/phpunit/includes/api/ApiParseTest.php
M tests/phpunit/includes/api/ApiWatchTest.php
3 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/173075/1

diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php 
b/tests/phpunit/includes/api/ApiEditPageTest.php
index 3179a45..f461be4 100644
--- a/tests/phpunit/includes/api/ApiEditPageTest.php
+++ b/tests/phpunit/includes/api/ApiEditPageTest.php
@@ -34,6 +34,8 @@
                MWNamespace::getCanonicalNamespaces( true ); # reset namespace 
cache
                $wgContLang->resetNamespaces(); # reset namespace cache
 
+               $this->stashMwGlobals( 'wgTitle' ); // set by ApiEditPage
+
                $this->doLogin();
        }
 
diff --git a/tests/phpunit/includes/api/ApiParseTest.php 
b/tests/phpunit/includes/api/ApiParseTest.php
index d038a4f..48049c4 100644
--- a/tests/phpunit/includes/api/ApiParseTest.php
+++ b/tests/phpunit/includes/api/ApiParseTest.php
@@ -11,6 +11,9 @@
 
        protected function setUp() {
                parent::setUp();
+
+               $this->stashMwGlobals( 'wgTitle' ); // set by ApiParse
+
                $this->doLogin();
        }
 
diff --git a/tests/phpunit/includes/api/ApiWatchTest.php 
b/tests/phpunit/includes/api/ApiWatchTest.php
index e49c6c0..1a35863 100644
--- a/tests/phpunit/includes/api/ApiWatchTest.php
+++ b/tests/phpunit/includes/api/ApiWatchTest.php
@@ -19,6 +19,8 @@
        /**
         */
        public function testWatchEdit() {
+               $this->stashMwGlobals( 'wgTitle' ); // set by ApiEditPage
+
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ee0c1ba6abb85cb48de41402e6e3599e0d6eba8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

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

Reply via email to