[MediaWiki-commits] [Gerrit] Fix visibility of setUp/tearDown - change (mediawiki...Scribunto)

2014-11-13 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  jenkins-bot: Verified



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..54fec2c 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() {
+   protected function getEngine() {
if ( !$this->engine ) {
$parser = new Parser;
$options = new ParserOptions;
@@ -188,7 +188,7 @@
return $this->engine;
}
 
-   function templateCallback( $title, $parser ) {
+   public 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 $

[MediaWiki-commits] [Gerrit] Fix visibility of setUp/tearDown - change (mediawiki...Scribunto)

2014-11-12 Thread WMDE
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/LuaEnvironment