jenkins-bot has submitted this change and it was merged.
Change subject: Make setUp and tearDown protected in tests
......................................................................
Make setUp and tearDown protected in tests
These are protected in the parent MediaWikiTestCase and
PHPUnit_Framework_TestCase. No good reason to make them public.
Change-Id: I45ecc0e4209f0c3b27e63a550112e4e0ddf6e530
---
M tests/phpunit/includes/RevisionStorageTest.php
M tests/phpunit/includes/SpecialPageTest.php
M tests/phpunit/includes/TitleMethodsTest.php
M tests/phpunit/includes/api/ApiEditPageTest.php
M tests/phpunit/includes/content/ContentHandlerTest.php
M tests/phpunit/includes/content/WikitextContentHandlerTest.php
M tests/phpunit/includes/diff/DifferenceEngineTest.php
M tests/phpunit/includes/parser/TidyTest.php
8 files changed, 12 insertions(+), 11 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/includes/RevisionStorageTest.php
b/tests/phpunit/includes/RevisionStorageTest.php
index 90ef553..7e275a5 100644
--- a/tests/phpunit/includes/RevisionStorageTest.php
+++ b/tests/phpunit/includes/RevisionStorageTest.php
@@ -56,7 +56,7 @@
}
}
- public function tearDown() {
+ protected function tearDown() {
global $wgExtraNamespaces, $wgNamespaceContentModels,
$wgContentHandlers, $wgContLang;
parent::tearDown();
diff --git a/tests/phpunit/includes/SpecialPageTest.php
b/tests/phpunit/includes/SpecialPageTest.php
index a29d527..65057a5 100644
--- a/tests/phpunit/includes/SpecialPageTest.php
+++ b/tests/phpunit/includes/SpecialPageTest.php
@@ -10,7 +10,7 @@
*/
class SpecialPageTest extends MediaWikiTestCase {
- public function setUp() {
+ protected function setUp() {
parent::setUp();
$this->setMwGlobals( array(
diff --git a/tests/phpunit/includes/TitleMethodsTest.php
b/tests/phpunit/includes/TitleMethodsTest.php
index 3079d73..55a17ac 100644
--- a/tests/phpunit/includes/TitleMethodsTest.php
+++ b/tests/phpunit/includes/TitleMethodsTest.php
@@ -9,7 +9,7 @@
*/
class TitleMethodsTest extends MediaWikiTestCase {
- public function setUp() {
+ protected function setUp() {
global $wgContLang;
parent::setUp();
@@ -33,7 +33,7 @@
$wgContLang->resetNamespaces(); # reset namespace cache
}
- public function tearDown() {
+ protected function tearDown() {
global $wgContLang;
parent::tearDown();
diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php
b/tests/phpunit/includes/api/ApiEditPageTest.php
index 8fe08e1..2709d52 100644
--- a/tests/phpunit/includes/api/ApiEditPageTest.php
+++ b/tests/phpunit/includes/api/ApiEditPageTest.php
@@ -13,7 +13,7 @@
*/
class ApiEditPageTest extends ApiTestCase {
- public function setUp() {
+ protected function setUp() {
global $wgExtraNamespaces, $wgNamespaceContentModels,
$wgContentHandlers, $wgContLang;
parent::setUp();
@@ -30,7 +30,7 @@
$this->doLogin();
}
- public function tearDown() {
+ protected function tearDown() {
global $wgExtraNamespaces, $wgNamespaceContentModels,
$wgContentHandlers, $wgContLang;
unset( $wgExtraNamespaces[12312] );
diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php
b/tests/phpunit/includes/content/ContentHandlerTest.php
index aedf594..d1c214a 100644
--- a/tests/phpunit/includes/content/ContentHandlerTest.php
+++ b/tests/phpunit/includes/content/ContentHandlerTest.php
@@ -10,7 +10,7 @@
*/
class ContentHandlerTest extends MediaWikiTestCase {
- public function setUp() {
+ protected function setUp() {
global $wgContLang;
parent::setUp();
@@ -38,7 +38,7 @@
$wgContLang->resetNamespaces();
}
- public function tearDown() {
+ protected function tearDown() {
global $wgContLang;
// Reset namespace cache
diff --git a/tests/phpunit/includes/content/WikitextContentHandlerTest.php
b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
index 7c62dca..73b975b 100644
--- a/tests/phpunit/includes/content/WikitextContentHandlerTest.php
+++ b/tests/phpunit/includes/content/WikitextContentHandlerTest.php
@@ -10,7 +10,7 @@
*/
var $handler;
- public function setUp() {
+ protected function setUp() {
parent::setUp();
$this->handler = ContentHandler::getForModelID(
CONTENT_MODEL_WIKITEXT );
diff --git a/tests/phpunit/includes/diff/DifferenceEngineTest.php
b/tests/phpunit/includes/diff/DifferenceEngineTest.php
index 5c3f36a..f95eb5e 100644
--- a/tests/phpunit/includes/diff/DifferenceEngineTest.php
+++ b/tests/phpunit/includes/diff/DifferenceEngineTest.php
@@ -16,7 +16,7 @@
private static $revisions;
- public function setUp() {
+ protected function setUp() {
parent::setUp();
$title = $this->getTitle();
diff --git a/tests/phpunit/includes/parser/TidyTest.php
b/tests/phpunit/includes/parser/TidyTest.php
index d2ab4d3..12aac69 100644
--- a/tests/phpunit/includes/parser/TidyTest.php
+++ b/tests/phpunit/includes/parser/TidyTest.php
@@ -4,7 +4,8 @@
* @group Parser
*/
class TidyTest extends MediaWikiTestCase {
- public function setUp() {
+
+ protected function setUp() {
parent::setUp();
$check = MWTidy::tidy( '' );
if ( strpos( $check, '<!--' ) !== false ) {
--
To view, visit https://gerrit.wikimedia.org/r/97355
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I45ecc0e4209f0c3b27e63a550112e4e0ddf6e530
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits