From: umherirrender Date: Fri, 22 Mar 2013 16:44:34 +0000 (+0100) Subject: Tests: Fix case of some methods X-Git-Tag: 1.31.0-rc.0~20248^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=7d8a184bac00bf26604c9d8eee3fe414215b3ebd;p=lhc%2Fweb%2Fwiklou.git Tests: Fix case of some methods Change-Id: Iab247f805410f2e9157d325edd80880538a3e54c --- diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index ce621f4e37..32b8154670 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -487,7 +487,7 @@ class ParserTest { } elseif ( isset( $opts['comment'] ) ) { $out = Linker::formatComment( $input, $title, $local ); } elseif ( isset( $opts['preload'] ) ) { - $out = $parser->getpreloadText( $input, $title, $options ); + $out = $parser->getPreloadText( $input, $title, $options ); } else { $output = $parser->parse( $input, $title, $options, true, true, 1337 ); $out = $output->getText(); diff --git a/tests/phpunit/includes/MWNamespaceTest.php b/tests/phpunit/includes/MWNamespaceTest.php index 45f8dafc45..6b71b7e2b4 100644 --- a/tests/phpunit/includes/MWNamespaceTest.php +++ b/tests/phpunit/includes/MWNamespaceTest.php @@ -346,33 +346,33 @@ class MWNamespaceTest extends MediaWikiTestCase { $this->assertEquals( array( NS_MAIN ), - MWNamespace::getcontentNamespaces(), + MWNamespace::getContentNamespaces(), '$wgContentNamespaces is an array with only NS_MAIN by default' ); # test !is_array( $wgcontentNamespaces ) $wgContentNamespaces = ''; - $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() ); + $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() ); $wgContentNamespaces = false; - $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() ); + $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() ); $wgContentNamespaces = null; - $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() ); + $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() ); $wgContentNamespaces = 5; - $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() ); + $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() ); # test $wgContentNamespaces === array() $wgContentNamespaces = array(); - $this->assertEquals( NS_MAIN, MWNamespace::getcontentNamespaces() ); + $this->assertEquals( NS_MAIN, MWNamespace::getContentNamespaces() ); # test !in_array( NS_MAIN, $wgContentNamespaces ) $wgContentNamespaces = array( NS_USER, NS_CATEGORY ); $this->assertEquals( array( NS_MAIN, NS_USER, NS_CATEGORY ), - MWNamespace::getcontentNamespaces(), + MWNamespace::getContentNamespaces(), 'NS_MAIN is forced in $wgContentNamespaces even if unwanted' ); @@ -380,13 +380,13 @@ class MWNamespaceTest extends MediaWikiTestCase { $wgContentNamespaces = array( NS_MAIN ); $this->assertEquals( array( NS_MAIN ), - MWNamespace::getcontentNamespaces() + MWNamespace::getContentNamespaces() ); $wgContentNamespaces = array( NS_MAIN, NS_USER, NS_CATEGORY ); $this->assertEquals( array( NS_MAIN, NS_USER, NS_CATEGORY ), - MWNamespace::getcontentNamespaces() + MWNamespace::getContentNamespaces() ); } diff --git a/tests/phpunit/includes/TitleMethodsTest.php b/tests/phpunit/includes/TitleMethodsTest.php index 89812c9012..476c194684 100644 --- a/tests/phpunit/includes/TitleMethodsTest.php +++ b/tests/phpunit/includes/TitleMethodsTest.php @@ -10,7 +10,7 @@ */ class TitleMethodsTest extends MediaWikiTestCase { - public function setup() { + public function setUp() { global $wgContLang; parent::setUp(); @@ -34,7 +34,7 @@ class TitleMethodsTest extends MediaWikiTestCase { $wgContLang->resetNamespaces(); # reset namespace cache } - public function teardown() { + public function tearDown() { global $wgContLang; parent::tearDown(); diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php b/tests/phpunit/includes/api/ApiEditPageTest.php index 06f93d7c2e..7d8e01fa1d 100644 --- a/tests/phpunit/includes/api/ApiEditPageTest.php +++ b/tests/phpunit/includes/api/ApiEditPageTest.php @@ -11,10 +11,10 @@ */ class ApiEditPageTest extends ApiTestCase { - public function setup() { + public function setUp() { global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang; - parent::setup(); + parent::setUp(); $wgExtraNamespaces[12312] = 'Dummy'; $wgExtraNamespaces[12313] = 'Dummy_talk'; @@ -28,7 +28,7 @@ class ApiEditPageTest extends ApiTestCase { $this->doLogin(); } - public function teardown() { + public function tearDown() { global $wgExtraNamespaces, $wgNamespaceContentModels, $wgContentHandlers, $wgContLang; unset( $wgExtraNamespaces[12312] ); @@ -40,7 +40,7 @@ class ApiEditPageTest extends ApiTestCase { MWNamespace::getCanonicalNamespaces( true ); # reset namespace cache $wgContLang->resetNamespaces(); # reset namespace cache - parent::teardown(); + parent::tearDown(); } function testEdit() { diff --git a/tests/phpunit/includes/content/ContentHandlerTest.php b/tests/phpunit/includes/content/ContentHandlerTest.php index 19ceadd5cc..5f75dc962d 100644 --- a/tests/phpunit/includes/content/ContentHandlerTest.php +++ b/tests/phpunit/includes/content/ContentHandlerTest.php @@ -10,9 +10,9 @@ */ class ContentHandlerTest extends MediaWikiTestCase { - public function setup() { + public function setUp() { global $wgContLang; - parent::setup(); + parent::setUp(); $this->setMwGlobals( array( 'wgExtraNamespaces' => array( diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php index bf6931a1f6..5732beb3dc 100644 --- a/tests/phpunit/includes/parser/NewParserTest.php +++ b/tests/phpunit/includes/parser/NewParserTest.php @@ -577,7 +577,7 @@ class NewParserTest extends MediaWikiTestCase { } elseif ( isset( $opts['comment'] ) ) { $out = Linker::formatComment( $input, $title, $local ); } elseif ( isset( $opts['preload'] ) ) { - $out = $parser->getpreloadText( $input, $title, $options ); + $out = $parser->getPreloadText( $input, $title, $options ); } else { $output = $parser->parse( $input, $title, $options, true, true, 1337 ); $out = $output->getText();