Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Fix visibility of setUp/tearDown
......................................................................

Fix visibility of setUp/tearDown

Required for Idf44d31.

Change-Id: If6d270549290bed2d1c7617da0fedbd385f3e96c
---
M tests/engines/LuaCommon/CommonTest.php
M tests/engines/LuaCommon/HtmlLibraryTest.php
M tests/engines/LuaCommon/LuaEngineTestBase.php
M tests/engines/LuaCommon/LuaEnvironmentComparisonTest.php
M tests/engines/LuaCommon/LuaInterpreterTest.php
M tests/engines/LuaCommon/SiteLibraryTest.php
M tests/engines/LuaCommon/TextLibraryTest.php
M tests/engines/LuaCommon/TitleLibraryTest.php
M tests/engines/LuaCommon/UriLibraryTest.php
M tests/engines/LuaCommon/UstringLibraryPureLuaTest.php
M tests/engines/LuaCommon/UstringLibraryTest.php
M tests/engines/LuaStandalone/StandaloneTest.php
12 files changed, 25 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/88/172688/1

diff --git a/tests/engines/LuaCommon/CommonTest.php 
b/tests/engines/LuaCommon/CommonTest.php
index 4caaf51..19504f7 100644
--- a/tests/engines/LuaCommon/CommonTest.php
+++ b/tests/engines/LuaCommon/CommonTest.php
@@ -40,7 +40,7 @@
                '_VERSION',
        );
 
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
 
                // Register libraries for self::testPHPLibrary()
diff --git a/tests/engines/LuaCommon/HtmlLibraryTest.php 
b/tests/engines/LuaCommon/HtmlLibraryTest.php
index bb027e4..5b47962 100644
--- a/tests/engines/LuaCommon/HtmlLibraryTest.php
+++ b/tests/engines/LuaCommon/HtmlLibraryTest.php
@@ -3,7 +3,7 @@
 class Scribunto_LuaHtmlLibraryTests extends Scribunto_LuaEngineTestBase {
        protected static $moduleName = 'HtmlLibraryTests';
 
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'HtmlLibraryTests' => __DIR__ . '/HtmlLibraryTests.lua',
                );
diff --git a/tests/engines/LuaCommon/LuaEngineTestBase.php 
b/tests/engines/LuaCommon/LuaEngineTestBase.php
index e2c62f4..e7721b4 100644
--- a/tests/engines/LuaCommon/LuaEngineTestBase.php
+++ b/tests/engines/LuaCommon/LuaEngineTestBase.php
@@ -148,7 +148,7 @@
                return $suite;
        }
 
-       function tearDown() {
+       protected function tearDown() {
                if ( $this->luaDataProvider ) {
                        $this->luaDataProvider->destroy();
                        $this->luaDataProvider = null;
@@ -172,7 +172,7 @@
        /**
         * @return ScribuntoEngineBase
         */
-       function getEngine() {
+       private function getEngine() {
                if ( !$this->engine ) {
                        $parser = new Parser;
                        $options = new ParserOptions;
@@ -188,7 +188,7 @@
                return $this->engine;
        }
 
-       function templateCallback( $title, $parser ) {
+       private function templateCallback( $title, $parser ) {
                if ( isset($this->extraModules[$title->getFullText()]) ) {
                        return array(
                                'text' => 
$this->extraModules[$title->getFullText()],
@@ -211,7 +211,7 @@
                return Parser::statelessFetchTemplate( $title, $parser );
        }
 
-       function toString() {
+       public function toString() {
                // When running tests written in Lua, return a nicer 
representation in
                // the failure message.
                if ( $this->luaTestName ) {
@@ -220,13 +220,13 @@
                return $this->engineName . ': ' . parent::toString();
        }
 
-       function getTestModules() {
+       protected function getTestModules() {
                return array(
                        'TestFramework' => __DIR__ . '/TestFramework.lua',
                );
        }
 
-       function provideLuaData() {
+       public function provideLuaData() {
                if ( !$this->luaDataProvider ) {
                        $class = static::$dataProviderClass;
                        $this->luaDataProvider = new $class ( 
$this->getEngine(), static::$moduleName );
@@ -235,7 +235,7 @@
        }
 
        /** @dataProvider provideLuaData */
-       function testLua( $key, $testName, $expected ) {
+       public function testLua( $key, $testName, $expected ) {
                $this->luaTestName = static::$moduleName."[$key]: $testName";
                if ( isset( $this->skipTests[$testName] ) ) {
                        $this->markTestSkipped( $this->skipTests[$testName] );
diff --git a/tests/engines/LuaCommon/LuaEnvironmentComparisonTest.php 
b/tests/engines/LuaCommon/LuaEnvironmentComparisonTest.php
index 196e4a8..6921cf5 100644
--- a/tests/engines/LuaCommon/LuaEnvironmentComparisonTest.php
+++ b/tests/engines/LuaCommon/LuaEnvironmentComparisonTest.php
@@ -33,7 +33,7 @@
                return $engine;
        }
 
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
 
                try {
@@ -55,7 +55,7 @@
                }
        }
 
-       function tearDown() {
+       protected function tearDown() {
                foreach ( $this->engines as $engine ) {
                        $engine->destroy();
                }
diff --git a/tests/engines/LuaCommon/LuaInterpreterTest.php 
b/tests/engines/LuaCommon/LuaInterpreterTest.php
index f2f83c5..a7add81 100644
--- a/tests/engines/LuaCommon/LuaInterpreterTest.php
+++ b/tests/engines/LuaCommon/LuaInterpreterTest.php
@@ -3,7 +3,7 @@
 abstract class Scribunto_LuaInterpreterTest extends MediaWikiTestCase {
        abstract function newInterpreter( $opts = array() );
 
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
                try {
                        $this->newInterpreter();
diff --git a/tests/engines/LuaCommon/SiteLibraryTest.php 
b/tests/engines/LuaCommon/SiteLibraryTest.php
index ada9784..a213136 100644
--- a/tests/engines/LuaCommon/SiteLibraryTest.php
+++ b/tests/engines/LuaCommon/SiteLibraryTest.php
@@ -3,7 +3,7 @@
 class Scribunto_LuaSiteLibraryTests extends Scribunto_LuaEngineTestBase {
        protected static $moduleName = 'SiteLibraryTests';
 
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'SiteLibraryTests' => __DIR__ . '/SiteLibraryTests.lua',
                );
diff --git a/tests/engines/LuaCommon/TextLibraryTest.php 
b/tests/engines/LuaCommon/TextLibraryTest.php
index 928bb75..ac31e46 100644
--- a/tests/engines/LuaCommon/TextLibraryTest.php
+++ b/tests/engines/LuaCommon/TextLibraryTest.php
@@ -3,7 +3,7 @@
 class Scribunto_LuaTextLibraryTests extends Scribunto_LuaEngineTestBase {
        protected static $moduleName = 'TextLibraryTests';
 
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
 
                // For unstrip test
@@ -14,8 +14,7 @@
                );
        }
 
-
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'TextLibraryTests' => __DIR__ . '/TextLibraryTests.lua',
                );
diff --git a/tests/engines/LuaCommon/TitleLibraryTest.php 
b/tests/engines/LuaCommon/TitleLibraryTest.php
index 02db20b..8eea3f7 100644
--- a/tests/engines/LuaCommon/TitleLibraryTest.php
+++ b/tests/engines/LuaCommon/TitleLibraryTest.php
@@ -19,7 +19,7 @@
                return parent::suite( $className );
        }
 
-       function setUp() {
+       protected function setUp() {
                global $wgHooks;
 
                parent::setUp();
@@ -103,13 +103,13 @@
                ) );
        }
 
-       function tearDown() {
+       protected function tearDown() {
                global $wgHooks;
                $wgHooks = $this->hooks;
                parent::tearDown();
        }
 
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'TitleLibraryTests' => __DIR__ . 
'/TitleLibraryTests.lua',
                );
diff --git a/tests/engines/LuaCommon/UriLibraryTest.php 
b/tests/engines/LuaCommon/UriLibraryTest.php
index b1c6128..24a1de4 100644
--- a/tests/engines/LuaCommon/UriLibraryTest.php
+++ b/tests/engines/LuaCommon/UriLibraryTest.php
@@ -3,7 +3,7 @@
 class Scribunto_LuaUriLibraryTests extends Scribunto_LuaEngineTestBase {
        protected static $moduleName = 'UriLibraryTests';
 
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
 
                $this->setMwGlobals( array(
@@ -17,7 +17,7 @@
                ) );
        }
 
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'UriLibraryTests' => __DIR__ . '/UriLibraryTests.lua',
                );
diff --git a/tests/engines/LuaCommon/UstringLibraryPureLuaTest.php 
b/tests/engines/LuaCommon/UstringLibraryPureLuaTest.php
index e135fcf..141996d 100644
--- a/tests/engines/LuaCommon/UstringLibraryPureLuaTest.php
+++ b/tests/engines/LuaCommon/UstringLibraryPureLuaTest.php
@@ -3,7 +3,7 @@
 require_once( __DIR__ . '/UstringLibraryTest.php' );
 
 class Scribunto_LuaUstringLibraryPureLuaTests extends 
Scribunto_LuaUstringLibraryTests {
-       function setUp() {
+       protected function setUp() {
                parent::setUp();
 
                // Override mw.ustring with the pure-Lua version
diff --git a/tests/engines/LuaCommon/UstringLibraryTest.php 
b/tests/engines/LuaCommon/UstringLibraryTest.php
index 8c2eaac..b0131ce 100644
--- a/tests/engines/LuaCommon/UstringLibraryTest.php
+++ b/tests/engines/LuaCommon/UstringLibraryTest.php
@@ -5,7 +5,7 @@
 
        private $normalizationDataProvider = null;
 
-       function tearDown() {
+       protected function tearDown() {
                if ( $this->normalizationDataProvider ) {
                        $this->normalizationDataProvider->destroy();
                        $this->normalizationDataProvider = null;
@@ -13,7 +13,7 @@
                parent::tearDown();
        }
 
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'UstringLibraryTests' => __DIR__ . 
'/UstringLibraryTests.lua',
                        'UstringLibraryNormalizationTests' => __DIR__ . 
'/UstringLibraryNormalizationTests.lua',
diff --git a/tests/engines/LuaStandalone/StandaloneTest.php 
b/tests/engines/LuaStandalone/StandaloneTest.php
index d9e52af..58811c4 100644
--- a/tests/engines/LuaStandalone/StandaloneTest.php
+++ b/tests/engines/LuaStandalone/StandaloneTest.php
@@ -7,7 +7,7 @@
                return self::makeSuite( $className, 'LuaStandalone' );
        }
 
-       public function setUp() {
+       protected function setUp() {
                parent::setUp();
 
                $interpreter = $this->getEngine()->getInterpreter();
@@ -19,7 +19,7 @@
                );
        }
 
-       function getTestModules() {
+       protected function getTestModules() {
                return parent::getTestModules() + array(
                        'StandaloneTests' => __DIR__ . '/StandaloneTests.lua',
                );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6d270549290bed2d1c7617da0fedbd385f3e96c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

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

Reply via email to