Fix scope on all /phpunit test methods
authoraddshore <addshorewiki@gmail.com>
Wed, 23 Oct 2013 22:51:31 +0000 (23:51 +0100)
committerAntoine Musso <hashar@free.fr>
Thu, 24 Oct 2013 08:31:32 +0000 (10:31 +0200)
Change-Id: I3ce92463d485a0fb23e464e9a8059330f32d79af

68 files changed:
tests/phpunit/includes/ArticleTablesTest.php
tests/phpunit/includes/ArticleTest.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/CollationTest.php
tests/phpunit/includes/DiffHistoryBlobTest.php
tests/phpunit/includes/EditPageTest.php
tests/phpunit/includes/ExternalStoreTest.php
tests/phpunit/includes/ExtraParserTest.php
tests/phpunit/includes/FauxRequestTest.php
tests/phpunit/includes/FauxResponseTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/GlobalWithDBTest.php
tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php
tests/phpunit/includes/GlobalFunctions/wfBaseNameTest.php
tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
tests/phpunit/includes/GlobalFunctions/wfShorthandToIntegerTest.php
tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php
tests/phpunit/includes/HashRingTest.php
tests/phpunit/includes/HtmlTest.php
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/IPTest.php
tests/phpunit/includes/LanguageConverterTest.php
tests/phpunit/includes/LicensesTest.php
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/LocalFileTest.php
tests/phpunit/includes/MWFunctionTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/SampleTest.php
tests/phpunit/includes/StringUtilsTest.php
tests/phpunit/includes/TemplateCategoriesTest.php
tests/phpunit/includes/WebRequestTest.php
tests/phpunit/includes/XmlTest.php
tests/phpunit/includes/ZipDirectoryReaderTest.php
tests/phpunit/includes/api/ApiAccountCreationTest.php
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiEditPageTest.php
tests/phpunit/includes/api/ApiParseTest.php
tests/phpunit/includes/api/ApiPurgeTest.php
tests/phpunit/includes/api/ApiTest.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/ApiWatchTest.php
tests/phpunit/includes/api/format/ApiFormatPhpTest.php
tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
tests/phpunit/includes/api/query/ApiQueryTest.php
tests/phpunit/includes/cache/GenderCacheTest.php
tests/phpunit/includes/cache/MessageCacheTest.php
tests/phpunit/includes/cache/ProcessCacheLRUTest.php
tests/phpunit/includes/db/DatabaseMysqlBaseTest.php
tests/phpunit/includes/db/DatabaseSQLTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTest.php
tests/phpunit/includes/debug/MWDebugTest.php
tests/phpunit/includes/filerepo/FileRepoTest.php
tests/phpunit/includes/installer/InstallDocFormatterTest.php
tests/phpunit/includes/installer/OracleInstallerTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/libs/IEUrlExtensionTest.php
tests/phpunit/includes/libs/JavaScriptMinifierTest.php
tests/phpunit/includes/normal/CleanUpTest.php
tests/phpunit/includes/parser/NewParserTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/includes/parser/TagHooksTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/includes/search/SearchUpdateTest.php
tests/phpunit/includes/specials/QueryAllSpecialPagesTest.php
tests/phpunit/includes/specials/SpecialPreferencesTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php

index 686ab93..0f159ae 100644 (file)
@@ -5,7 +5,7 @@
  */
 class ArticleTablesTest extends MediaWikiLangTestCase {
 
-       function testbug14404() {
+       public function testbug14404() {
                global $wgContLang, $wgLanguageCode, $wgLang;
 
                $title = Title::newFromText( 'Bug 14404' );
index 867c4f0..b4d6dca 100644 (file)
@@ -25,14 +25,14 @@ class ArticleTest extends MediaWikiTestCase {
                $this->article = null;
        }
 
-       function testImplementsGetMagic() {
+       public function testImplementsGetMagic() {
                $this->assertEquals( false, $this->article->mLatest, "Article __get magic" );
        }
 
        /**
         * @depends testImplementsGetMagic
         */
-       function testImplementsSetMagic() {
+       public function testImplementsSetMagic() {
                $this->article->mLatest = 2;
                $this->assertEquals( 2, $this->article->mLatest, "Article __set magic" );
        }
@@ -40,13 +40,13 @@ class ArticleTest extends MediaWikiTestCase {
        /**
         * @depends testImplementsSetMagic
         */
-       function testImplementsCallMagic() {
+       public function testImplementsCallMagic() {
                $this->article->mLatest = 33;
                $this->article->mDataLoaded = true;
                $this->assertEquals( 33, $this->article->getLatest(), "Article __call magic" );
        }
 
-       function testGetOrSetOnNewProperty() {
+       public function testGetOrSetOnNewProperty() {
                $this->article->ext_someNewProperty = 12;
                $this->assertEquals( 12, $this->article->ext_someNewProperty,
                        "Article get/set magic on new field" );
@@ -59,7 +59,7 @@ class ArticleTest extends MediaWikiTestCase {
        /**
         * Checks for the existence of the backwards compatibility static functions (forwarders to WikiPage class)
         */
-       function testStaticFunctions() {
+       public function testStaticFunctions() {
                $this->hideDeprecated( 'Article::getAutosummary' );
                $this->hideDeprecated( 'WikiPage::getAutosummary' );
                $this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article
@@ -76,7 +76,7 @@ class ArticleTest extends MediaWikiTestCase {
                        "Article static functions" );
        }
 
-       function testWikiPageFactory() {
+       public function testWikiPageFactory() {
                $title = Title::makeTitle( NS_FILE, 'Someimage.png' );
                $page = WikiPage::factory( $title );
                $this->assertEquals( 'WikiFilePage', get_class( $page ) );
index 32fc2c5..21de098 100644 (file)
@@ -66,7 +66,7 @@ class BlockTest extends MediaWikiLangTestCase {
                }
        }
 
-       function testInitializerFunctionsReturnCorrectBlock() {
+       public function testInitializerFunctionsReturnCorrectBlock() {
                // $this->dumpBlocks();
 
                $this->assertTrue( $this->block->equals( Block::newFromTarget( 'UTBlockee' ) ), "newFromTarget() returns the same block as the one that was made" );
@@ -77,7 +77,7 @@ class BlockTest extends MediaWikiLangTestCase {
        /**
         * per bug 26425
         */
-       function testBug26425BlockTimestampDefaultsToTime() {
+       public function testBug26425BlockTimestampDefaultsToTime() {
                // delta to stop one-off errors when things happen to go over a second mark.
                $delta = abs( $this->madeAt - $this->block->mTimestamp );
                $this->assertLessThan( 2, $delta, "If no timestamp is specified, the block is recorded as time()" );
@@ -91,7 +91,7 @@ class BlockTest extends MediaWikiLangTestCase {
         *
         * @dataProvider provideBug29116Data
         */
-       function testBug29116LoadWithEmptyIp( $vagueTarget ) {
+       public function testBug29116LoadWithEmptyIp( $vagueTarget ) {
                $this->hideDeprecated( 'Block::load' );
 
                $uid = User::idFromName( 'UTBlockee' );
@@ -111,7 +111,7 @@ class BlockTest extends MediaWikiLangTestCase {
         *
         * @dataProvider provideBug29116Data
         */
-       function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
+       public function testBug29116NewFromTargetWithEmptyIp( $vagueTarget ) {
                $block = Block::newFromTarget( 'UTBlockee', $vagueTarget );
                $this->assertTrue( $this->block->equals( $block ), "newFromTarget() returns the same block as the one that was made when given empty vagueTarget param " . var_export( $vagueTarget, true ) );
        }
@@ -124,7 +124,7 @@ class BlockTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testBlockedUserCanNotCreateAccount() {
+       public function testBlockedUserCanNotCreateAccount() {
                $username = 'BlockedUserToCreateAccountWith';
                $u = User::newFromName( $username );
                $u->setPassword( 'NotRandomPass' );
@@ -184,7 +184,7 @@ class BlockTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testCrappyCrossWikiBlocks() {
+       public function testCrappyCrossWikiBlocks() {
                // Delete the last round's block if it's still there
                $oldBlock = Block::newFromTarget( 'UserOnForeignWiki' );
                if ( $oldBlock ) {
@@ -344,7 +344,7 @@ class BlockTest extends MediaWikiLangTestCase {
        /**
         * @dataProvider providerXff
         */
-       function testBlocksOnXff( $xff, $exCount, $exResult ) {
+       public function testBlocksOnXff( $xff, $exCount, $exResult ) {
                $list = array_map( 'trim', explode( ',', $xff ) );
                $xffblocks = Block::getBlocksForIPList( $list, true );
                $this->assertEquals( $exCount, count( $xffblocks ), 'Number of blocks for ' . $xff );
index f1004fb..43bb394 100644 (file)
@@ -20,7 +20,7 @@ class CollationTest extends MediaWikiLangTestCase {
         *
         * @dataProvider prefixDataProvider
         */
-       function testIsPrefix( $lang, $base, $extended ) {
+       public function testIsPrefix( $lang, $base, $extended ) {
                $cp = Collator::create( $lang );
                $cp->setStrength( Collator::PRIMARY );
                $baseBin = $cp->getSortKey( $base );
@@ -53,7 +53,7 @@ class CollationTest extends MediaWikiLangTestCase {
         *
         * @dataProvider notPrefixDataProvider
         */
-       function testNotIsPrefix( $lang, $base, $extended ) {
+       public function testNotIsPrefix( $lang, $base, $extended ) {
                $cp = Collator::create( $lang );
                $cp->setStrength( Collator::PRIMARY );
                $baseBin = $cp->getSortKey( $base );
@@ -81,7 +81,7 @@ class CollationTest extends MediaWikiLangTestCase {
         *
         * @dataProvider firstLetterProvider
         */
-       function testGetFirstLetter( $collation, $string, $firstLetter ) {
+       public function testGetFirstLetter( $collation, $string, $firstLetter ) {
                $col = Collation::factory( $collation );
                $this->assertEquals( $firstLetter, $col->getFirstLetter( $string ) );
        }
index d927b7a..a4d5b91 100644 (file)
@@ -24,7 +24,7 @@ class DiffHistoryBlobTest extends MediaWikiTestCase {
         * Test for DiffHistoryBlob::xdiffAdler32()
         * @dataProvider provideXdiffAdler32
         */
-       function testXdiffAdler32( $input ) {
+       public function testXdiffAdler32( $input ) {
                $xdiffHash = substr( xdiff_string_rabdiff( $input, '' ), 0, 4 );
                $dhb = new DiffHistoryBlob;
                $myHash = $dhb->xdiffAdler32( $input );
index 76ef782..87272a4 100644 (file)
@@ -14,7 +14,7 @@ class EditPageTest extends MediaWikiLangTestCase {
        /**
         * @dataProvider provideExtractSectionTitle
         */
-       function testExtractSectionTitle( $section, $title ) {
+       public function testExtractSectionTitle( $section, $title ) {
                $extracted = EditPage::extractSectionTitle( $section );
                $this->assertEquals( $title, $extracted );
        }
index 99544e7..fcffcbc 100644 (file)
@@ -5,7 +5,7 @@
 
 class ExternalStoreTest extends MediaWikiTestCase {
 
-       function testExternalFetchFromURL() {
+       public function testExternalFetchFromURL() {
                $this->setMwGlobals( 'wgExternalStores', false );
 
                $this->assertFalse(
index 07215c1..6c67beb 100644 (file)
@@ -27,7 +27,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        }
 
        // Bug 8689 - Long numeric lines kill the parser
-       function testBug8689() {
+       public function testBug8689() {
                global $wgUser;
                $longLine = '1.' . str_repeat( '1234567890', 100000 ) . "\n";
 
@@ -38,13 +38,13 @@ class ExtraParserTest extends MediaWikiTestCase {
        }
 
        /* Test the parser entry points */
-       function testParse() {
+       public function testParse() {
                $title = Title::newFromText( __FUNCTION__ );
                $parserOutput = $this->parser->parse( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
                $this->assertEquals( "<p>Test\nContent of <i>Template:Foo</i>\nContent of <i>Template:Bar</i>\n</p>", $parserOutput->getText() );
        }
 
-       function testPreSaveTransform() {
+       public function testPreSaveTransform() {
                global $wgUser;
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->preSaveTransform( "Test\r\n{{subst:Foo}}\n{{Bar}}", $title, $wgUser, $this->options );
@@ -52,7 +52,7 @@ class ExtraParserTest extends MediaWikiTestCase {
                $this->assertEquals( "Test\nContent of ''Template:Foo''\n{{Bar}}", $outputText );
        }
 
-       function testPreprocess() {
+       public function testPreprocess() {
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->preprocess( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
 
@@ -62,7 +62,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        /**
         * cleanSig() makes all templates substs and removes tildes
         */
-       function testCleanSig() {
+       public function testCleanSig() {
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->cleanSig( "{{Foo}} ~~~~" );
 
@@ -72,7 +72,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        /**
         * cleanSig() should do nothing if disabled
         */
-       function testCleanSigDisabled() {
+       public function testCleanSigDisabled() {
                $this->setMwGlobals( 'wgCleanSignatures', false );
 
                $title = Title::newFromText( __FUNCTION__ );
@@ -85,7 +85,7 @@ class ExtraParserTest extends MediaWikiTestCase {
         * cleanSigInSig() just removes tildes
         * @dataProvider provideStringsForCleanSigInSig
         */
-       function testCleanSigInSig( $in, $out ) {
+       public function testCleanSigInSig( $in, $out ) {
                $this->assertEquals( Parser::cleanSigInSig( $in ), $out );
        }
 
@@ -97,7 +97,7 @@ class ExtraParserTest extends MediaWikiTestCase {
                );
        }
 
-       function testGetSection() {
+       public function testGetSection() {
                $outputText2 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 2 );
                $outputText1 = $this->parser->getSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1 );
 
@@ -105,7 +105,7 @@ class ExtraParserTest extends MediaWikiTestCase {
                $this->assertEquals( "== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2", $outputText1 );
        }
 
-       function testReplaceSection() {
+       public function testReplaceSection() {
                $outputText = $this->parser->replaceSection( "Section 0\n== Heading 1 ==\nSection 1\n=== Heading 2 ===\nSection 2\n== Heading 3 ==\nSection 3\n", 1, "New section 1" );
 
                $this->assertEquals( "Section 0\nNew section 1\n\n== Heading 3 ==\nSection 3", $outputText );
@@ -114,7 +114,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        /**
         * Templates and comments are not affected, but noinclude/onlyinclude is.
         */
-       function testGetPreloadText() {
+       public function testGetPreloadText() {
                $title = Title::newFromText( __FUNCTION__ );
                $outputText = $this->parser->getPreloadText( "{{Foo}}<noinclude> censored</noinclude> information <!-- is very secret -->", $title, $this->options );
 
@@ -134,7 +134,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        /**
         * @group Database
         */
-       function testTrackingCategory() {
+       public function testTrackingCategory() {
                $title = Title::newFromText( __FUNCTION__ );
                $catName = wfMessage( 'broken-file-category' )->inContentLanguage()->text();
                $cat = Title::makeTitleSafe( NS_CATEGORY, $catName );
@@ -147,7 +147,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        /**
         * @group Database
         */
-       function testTrackingCategorySpecial() {
+       public function testTrackingCategorySpecial() {
                // Special pages shouldn't have tracking cats.
                $title = SpecialPage::getTitleFor( 'Contributions' );
                $parserOutput = $this->parser->parse( "[[file:nonexistent]]", $title, $this->options );
index dfb0f13..9f3aa11 100644 (file)
@@ -2,7 +2,7 @@
 
 class FauxRequestTest extends MediaWikiTestCase {
 
-       function testGetSetHeader() {
+       public function testGetSetHeader() {
                $value = 'test/test';
 
                $request = new FauxRequest();
index 977c22b..f9ba1b3 100644 (file)
@@ -30,13 +30,13 @@ class FauxResponseTest extends MediaWikiTestCase {
                $this->response = new FauxResponse;
        }
 
-       function testCookie() {
+       public function testCookie() {
                $this->assertEquals( null, $this->response->getcookie( 'key' ), 'Non-existing cookie' );
                $this->response->setcookie( 'key', 'val' );
                $this->assertEquals( 'val', $this->response->getcookie( 'key' ), 'Existing cookie' );
        }
 
-       function testHeader() {
+       public function testHeader() {
                $this->assertEquals( null, $this->response->getheader( 'Location' ), 'Non-existing header' );
 
                $this->response->header( 'Location: http://localhost/' );
@@ -52,7 +52,7 @@ class FauxResponseTest extends MediaWikiTestCase {
                $this->assertEquals( 'http://localhost/', $this->response->getheader( 'LOCATION' ), 'Get header case insensitive' );
        }
 
-       function testResponseCode() {
+       public function testResponseCode() {
                $this->response->header( 'HTTP/1.1 200' );
                $this->assertEquals( 200, $this->response->getStatusCode(), 'Header with no message' );
 
index 244b100..9b71999 100644 (file)
@@ -53,25 +53,25 @@ class GlobalTest extends MediaWikiTestCase {
                );
        }
 
-       function testRandom() {
+       public function testRandom() {
                # This could hypothetically fail, but it shouldn't ;)
                $this->assertFalse(
                        wfRandom() == wfRandom() );
        }
 
-       function testUrlencode() {
+       public function testUrlencode() {
                $this->assertEquals(
                        "%E7%89%B9%E5%88%A5:Contributions/Foobar",
                        wfUrlencode( "\xE7\x89\xB9\xE5\x88\xA5:Contributions/Foobar" ) );
        }
 
-       function testExpandIRI() {
+       public function testExpandIRI() {
                $this->assertEquals(
                        "https://te.wikibooks.org/wiki/ఉబుంటు_వాడుకరి_మార్గదర్శని",
                        wfExpandIRI( "https://te.wikibooks.org/wiki/%E0%B0%89%E0%B0%AC%E0%B1%81%E0%B0%82%E0%B0%9F%E0%B1%81_%E0%B0%B5%E0%B0%BE%E0%B0%A1%E0%B1%81%E0%B0%95%E0%B0%B0%E0%B0%BF_%E0%B0%AE%E0%B0%BE%E0%B0%B0%E0%B1%8D%E0%B0%97%E0%B0%A6%E0%B0%B0%E0%B1%8D%E0%B0%B6%E0%B0%A8%E0%B0%BF" ) );
        }
 
-       function testReadOnlyEmpty() {
+       public function testReadOnlyEmpty() {
                global $wgReadOnly;
                $wgReadOnly = null;
 
@@ -79,7 +79,7 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertFalse( wfReadOnly() );
        }
 
-       function testReadOnlySet() {
+       public function testReadOnlySet() {
                global $wgReadOnly, $wgReadOnlyFile;
 
                $f = fopen( $wgReadOnlyFile, "wt" );
@@ -97,7 +97,7 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertFalse( wfReadOnly() );
        }
 
-       function testQuotedPrintable() {
+       public function testQuotedPrintable() {
                $this->assertEquals(
                        "=?UTF-8?Q?=C4=88u=20legebla=3F?=",
                        UserMailer::quotedPrintable( "\xc4\x88u legebla?", "UTF-8" ) );
@@ -124,12 +124,12 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideArrayToCGI
         */
-       function testArrayToCGI( $array, $result ) {
+       public function testArrayToCGI( $array, $result ) {
                $this->assertEquals( $result, wfArrayToCgi( $array ) );
        }
 
 
-       function testArrayToCGI2() {
+       public function testArrayToCGI2() {
                $this->assertEquals(
                        "baz=bar&foo=bar",
                        wfArrayToCgi(
@@ -155,7 +155,7 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideCgiToArray
         */
-       function testCgiToArray( $cgi, $result ) {
+       public function testCgiToArray( $cgi, $result ) {
                $this->assertEquals( $result, wfCgiToArray( $cgi ) );
        }
 
@@ -175,11 +175,11 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideCgiRoundTrip
         */
-       function testCgiRoundTrip( $cgi ) {
+       public function testCgiRoundTrip( $cgi ) {
                $this->assertEquals( $cgi, wfArrayToCgi( wfCgiToArray( $cgi ) ) );
        }
 
-       function testMimeTypeMatch() {
+       public function testMimeTypeMatch() {
                $this->assertEquals(
                        'text/html',
                        mimeTypeMatch( 'text/html',
@@ -201,7 +201,7 @@ class GlobalTest extends MediaWikiTestCase {
                                        'image/svg+xml' => 0.5 ) ) );
        }
 
-       function testNegotiateType() {
+       public function testNegotiateType() {
                $this->assertEquals(
                        'text/html',
                        wfNegotiateType(
@@ -242,7 +242,7 @@ class GlobalTest extends MediaWikiTestCase {
                                array( 'application/xhtml+xml' => 1.0 ) ) );
        }
 
-       function testFallbackMbstringFunctions() {
+       public function testFallbackMbstringFunctions() {
 
                if ( !extension_loaded( 'mbstring' ) ) {
                        $this->markTestSkipped( "The mb_string functions must be installed to test the fallback functions" );
@@ -308,7 +308,7 @@ class GlobalTest extends MediaWikiTestCase {
        }
 
 
-       function testDebugFunctionTest() {
+       public function testDebugFunctionTest() {
 
                global $wgDebugLogFile, $wgDebugTimestamps;
 
@@ -342,7 +342,7 @@ class GlobalTest extends MediaWikiTestCase {
                $wgDebugTimestamps = $old_wgDebugTimestamps;
        }
 
-       function testClientAcceptsGzipTest() {
+       public function testClientAcceptsGzipTest() {
 
                $settings = array(
                        'gzip' => true,
@@ -373,7 +373,7 @@ class GlobalTest extends MediaWikiTestCase {
                }
        }
 
-       function testSwapVarsTest() {
+       public function testSwapVarsTest() {
                $var1 = 1;
                $var2 = 2;
 
@@ -386,7 +386,7 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertEquals( $var2, 1, 'var2 is swapped' );
        }
 
-       function testWfPercentTest() {
+       public function testWfPercentTest() {
 
                $pcts = array(
                        array( 6 / 7, '0.86%', 2, false ),
@@ -550,7 +550,7 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideMakeUrlIndexes()
         */
-       function testMakeUrlIndexes( $url, $expected ) {
+       public function testMakeUrlIndexes( $url, $expected ) {
                $index = wfMakeUrlIndexes( $url );
                $this->assertEquals( $expected, $index, "wfMakeUrlIndexes(\"$url\")" );
        }
@@ -607,7 +607,7 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideWfMatchesDomainList
         */
-       function testWfMatchesDomainList( $url, $domains, $expected, $description ) {
+       public function testWfMatchesDomainList( $url, $domains, $expected, $description ) {
                $actual = wfMatchesDomainList( $url, $domains );
                $this->assertEquals( $expected, $actual, $description );
        }
@@ -630,7 +630,7 @@ class GlobalTest extends MediaWikiTestCase {
                return $a;
        }
 
-       function testWfMkdirParents() {
+       public function testWfMkdirParents() {
                // Should not return true if file exists instead of directory
                $fname = $this->getNewTempFile();
                wfSuppressWarnings();
@@ -642,7 +642,7 @@ class GlobalTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideWfShellMaintenanceCmdList
         */
-       function testWfShellMaintenanceCmd( $script, $parameters, $options, $expected, $description ) {
+       public function testWfShellMaintenanceCmd( $script, $parameters, $options, $expected, $description ) {
                if ( wfIsWindows() ) {
                        // Approximation that's good enough for our purposes just now
                        $expected = str_replace( "'", '"', $expected );
index 8bd0849..8d15296 100644 (file)
@@ -7,7 +7,7 @@ class GlobalWithDBTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideWfIsBadImageList
         */
-       function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
+       public function testWfIsBadImage( $name, $title, $blacklist, $expected, $desc ) {
                $this->assertEquals( $expected, wfIsBadImage( $name, $title, $blacklist ), $desc );
        }
 
index baf9cee..def443c 100644 (file)
@@ -13,7 +13,7 @@ class WfBCP47Test extends MediaWikiTestCase {
         * @see http://tools.ietf.org/html/bcp47
         * @dataProvider provideLanguageCodes()
         */
-       function testBCP47( $code, $expected ) {
+       public function testBCP47( $code, $expected ) {
                $code = strtolower( $code );
                $this->assertEquals( $expected, wfBCP47( $code ),
                        "Applying BCP47 standard to lower case '$code'"
index 3c4fa20..be2b222 100644 (file)
@@ -6,7 +6,7 @@ class WfBaseNameTest extends MediaWikiTestCase {
        /**
         * @dataProvider providePaths
         */
-       function testBaseName( $fullpath, $basename ) {
+       public function testBaseName( $fullpath, $basename ) {
                $this->assertEquals( $basename, wfBaseName( $fullpath ),
                        "wfBaseName('$fullpath') => '$basename'" );
        }
index 3521d18..a148815 100644 (file)
@@ -2,7 +2,7 @@
 
 class WfGetCallerTest extends MediaWikiTestCase {
 
-       function testZero() {
+       public function testZero() {
                $this->assertEquals( __METHOD__, wfGetCaller( 1 ) );
        }
 
@@ -10,7 +10,7 @@ class WfGetCallerTest extends MediaWikiTestCase {
                return wfGetCaller();
        }
 
-       function testOne() {
+       public function testOne() {
                $this->assertEquals( 'WfGetCallerTest::testOne', self::callerOne() );
        }
 
@@ -22,11 +22,11 @@ class WfGetCallerTest extends MediaWikiTestCase {
                return wfGetCaller( $level );
        }
 
-       function testTwo() {
+       public function testTwo() {
                $this->assertEquals( 'WfGetCallerTest::testTwo', self::intermediateFunction() );
        }
 
-       function testN() {
+       public function testN() {
                $this->assertEquals( 'WfGetCallerTest::testN', self::intermediateFunction( 2, 0 ) );
                $this->assertEquals( 'WfGetCallerTest::intermediateFunction', self::intermediateFunction( 1, 0 ) );
 
index 604f901..485a362 100644 (file)
@@ -4,7 +4,7 @@ class WfShorthandToIntegerTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideABunchOfShorthands
         */
-       function testWfShorthandToInteger( $input, $output, $description ) {
+       public function testWfShorthandToInteger( $input, $output, $description ) {
                $this->assertEquals(
                        wfShorthandToInteger( $input ),
                        $output,
index 32bb49d..4198322 100644 (file)
@@ -6,7 +6,7 @@ class WfTimestampTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideNormalTimestamps
         */
-       function testNormalTimestamps( $input, $format, $output, $desc ) {
+       public function testNormalTimestamps( $input, $format, $output, $desc ) {
                $this->assertEquals( $output, wfTimestamp( $format, $input ), $desc );
        }
 
@@ -57,7 +57,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         * See r74778 and bug 25451
         * @dataProvider provideOldTimestamps
         */
-       function testOldTimestamps( $input, $format, $output, $desc ) {
+       public function testOldTimestamps( $input, $format, $output, $desc ) {
                $this->assertEquals( $output, wfTimestamp( $format, $input ), $desc );
        }
 
@@ -96,7 +96,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
         * @dataProvider provideHttpDates
         */
-       function testHttpDate( $input, $output, $desc ) {
+       public function testHttpDate( $input, $output, $desc ) {
                $this->assertEquals( $output, wfTimestamp( TS_MW, $input ), $desc );
        }
 
@@ -114,7 +114,7 @@ class WfTimestampTest extends MediaWikiTestCase {
         * There are a number of assumptions in our codebase where wfTimestamp()
         * should give the current date but it is not given a 0 there. See r71751 CR
         */
-       function testTimestampParameter() {
+       public function testTimestampParameter() {
                $now = wfTimestamp( TS_UNIX );
                // We check that wfTimestamp doesn't return false (error) and use a LessThan assert
                // for the cases where the test is run in a second boundary.
index bc4e499..65f1369 100644 (file)
@@ -4,7 +4,7 @@
  * @group HashRing
  */
 class HashRingTest extends MediaWikiTestCase {
-       function testHashRing() {
+       public function testHashRing() {
                $ring = new HashRing( array( 's1' => 1, 's2' => 1, 's3' => 2, 's4' => 2, 's5' => 2, 's6' => 3 ) );
 
                $locations = array();
index ecfe418..1c62d03 100644 (file)
@@ -250,7 +250,7 @@ class HtmlTest extends MediaWikiTestCase {
         * Test feature added by r96188, let pass attributes values as
         * a PHP array. Restricted to class,rel, accesskey.
         */
-       function testExpandAttributesSpaceSeparatedAttributesWithBoolean() {
+       public function testExpandAttributesSpaceSeparatedAttributesWithBoolean() {
                $this->assertEquals(
                        ' class="booltrue one"',
                        Html::expandAttributes( array( 'class' => array(
@@ -274,7 +274,7 @@ class HtmlTest extends MediaWikiTestCase {
         *
         * Feature added by r96188
         */
-       function testValueIsAuthoritativeInSpaceSeparatedAttributesArrays() {
+       public function testValueIsAuthoritativeInSpaceSeparatedAttributesArrays() {
                $this->assertEquals(
                        ' class=""',
                        Html::expandAttributes( array( 'class' => array(
@@ -285,7 +285,7 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
-       function testNamespaceSelector() {
+       public function testNamespaceSelector() {
                $this->assertEquals(
                        '<select id=namespace name=namespace>' . "\n" .
                                '<option value=0>(Main)</option>' . "\n" .
@@ -364,7 +364,7 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
-       function testCanFilterOutNamespaces() {
+       public function testCanFilterOutNamespaces() {
                $this->assertEquals(
                        '<select id=namespace name=namespace>' . "\n" .
                                '<option value=2>User</option>' . "\n" .
@@ -386,7 +386,7 @@ class HtmlTest extends MediaWikiTestCase {
                );
        }
 
-       function testCanDisableANamespaces() {
+       public function testCanDisableANamespaces() {
                $this->assertEquals(
                        '<select id=namespace name=namespace>' . "\n" .
                                '<option disabled value=0>(Main)</option>' . "\n" .
@@ -416,7 +416,7 @@ class HtmlTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideHtml5InputTypes
         */
-       function testHtmlElementAcceptsNewHtml5TypesInHtml5Mode( $HTML5InputType ) {
+       public function testHtmlElementAcceptsNewHtml5TypesInHtml5Mode( $HTML5InputType ) {
                $this->assertEquals(
                        '<input type=' . $HTML5InputType . '>',
                        Html::element( 'input', array( 'type' => $HTML5InputType ) ),
@@ -457,7 +457,7 @@ class HtmlTest extends MediaWikiTestCase {
         * @covers Html::dropDefaults
         * @dataProvider provideElementsWithAttributesHavingDefaultValues
         */
-       function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
+       public function testDropDefaults( $expected, $element, $attribs, $message = '' ) {
                $this->assertEquals( $expected, Html::element( $element, $attribs ), $message );
        }
 
index 6e0aa88..11d8ed6 100644 (file)
@@ -53,7 +53,7 @@ class HttpTest extends MediaWikiTestCase {
         * @dataProvider provideURI
         * @covers Http::isValidURI
         */
-       function testIsValidUri( $expect, $URI, $message = '' ) {
+       public function testIsValidUri( $expect, $URI, $message = '' ) {
                $this->assertEquals(
                        $expect,
                        (bool)Http::isValidURI( $URI ),
index 22bf0c0..c074eea 100644 (file)
@@ -392,7 +392,7 @@ class IPTest extends MediaWikiTestCase {
         * representing the network mask and the bit mask.
         * @covers IP::parseCIDR
         */
-       function testCIDRParsing() {
+       public function testCIDRParsing() {
                $this->assertFalseCIDR( '192.0.2.0', "missing mask" );
                $this->assertFalseCIDR( '192.0.2.0/', "missing bitmask" );
 
@@ -489,7 +489,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::splitHostAndPort().
         * @dataProvider provideSplitHostAndPort
         */
-       function testSplitHostAndPort( $expected, $input, $description ) {
+       public function testSplitHostAndPort( $expected, $input, $description ) {
                $this->assertEquals( $expected, IP::splitHostAndPort( $input ), $description );
        }
 
@@ -516,7 +516,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::combineHostAndPort()
         * @dataProvider provideCombineHostAndPort
         */
-       function testCombineHostAndPort( $expected, $input, $description ) {
+       public function testCombineHostAndPort( $expected, $input, $description ) {
                list( $host, $port, $defaultPort ) = $input;
                $this->assertEquals(
                        $expected,
@@ -540,7 +540,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::sanitizeRange()
         * @dataProvider provideIPCIDRs
         */
-       function testSanitizeRange( $input, $expected, $description ) {
+       public function testSanitizeRange( $input, $expected, $description ) {
                $this->assertEquals( $expected, IP::sanitizeRange( $input ), $description );
        }
 
@@ -564,7 +564,7 @@ class IPTest extends MediaWikiTestCase {
         * Test for IP::prettifyIP()
         * @dataProvider provideIPsToPrettify
         */
-       function testPrettifyIP( $ip, $prettified ) {
+       public function testPrettifyIP( $ip, $prettified ) {
                $this->assertEquals( $prettified, IP::prettifyIP( $ip ), "Prettify of $ip" );
        }
 
index 070a680..7c2134b 100644 (file)
@@ -30,39 +30,39 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                parent::tearDown();
        }
 
-       function testGetPreferredVariantDefaults() {
+       public function testGetPreferredVariantDefaults() {
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaders() {
+       public function testGetPreferredVariantHeaders() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'tg-latn' );
 
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderWeight() {
+       public function testGetPreferredVariantHeaderWeight() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'tg;q=1' );
 
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderWeight2() {
+       public function testGetPreferredVariantHeaderWeight2() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'tg-latn;q=1' );
 
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderMulti() {
+       public function testGetPreferredVariantHeaderMulti() {
                global $wgRequest;
                $wgRequest->setHeader( 'Accept-Language', 'en, tg-latn;q=1' );
 
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantUserOption() {
+       public function testGetPreferredVariantUserOption() {
                global $wgUser;
 
                $wgUser = new User;
@@ -75,7 +75,7 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantUserOptionForForeignLanguage() {
+       public function testGetPreferredVariantUserOptionForForeignLanguage() {
                global $wgContLang, $wgUser;
 
                $wgContLang = Language::factory( 'en' );
@@ -89,7 +89,7 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantHeaderUserVsUrl() {
+       public function testGetPreferredVariantHeaderUserVsUrl() {
                global $wgContLang, $wgRequest, $wgUser;
 
                $wgContLang = Language::factory( 'tg-latn' );
@@ -104,14 +104,14 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
        }
 
 
-       function testGetPreferredVariantDefaultLanguageVariant() {
+       public function testGetPreferredVariantDefaultLanguageVariant() {
                global $wgDefaultLanguageVariant;
 
                $wgDefaultLanguageVariant = 'tg-latn';
                $this->assertEquals( 'tg-latn', $this->lc->getPreferredVariant() );
        }
 
-       function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
+       public function testGetPreferredVariantDefaultLanguageVsUrlVariant() {
                global $wgDefaultLanguageVariant, $wgRequest, $wgContLang;
 
                $wgContLang = Language::factory( 'tg-latn' );
index 212b3b3..478a2ff 100644 (file)
@@ -2,7 +2,7 @@
 
 class LicensesTest extends MediaWikiTestCase {
 
-       function testLicenses() {
+       public function testLicenses() {
                $str = "
 * Free licenses:
 ** GFDL|Debian disagrees
index ec4d98e..b605f08 100644 (file)
@@ -6,7 +6,7 @@ class LinkerTest extends MediaWikiLangTestCase {
         * @dataProvider provideCasesForUserLink
         * @covers Linker::userLink
         */
-       function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
+       public function testUserLink( $expected, $userId, $userName, $altUserName = false, $msg = '' ) {
                $this->setMwGlobals( array(
                        'wgArticlePath' => '/wiki/$1',
                        'wgWellFormedXml' => true,
index d6f0d2e..2501c78 100644 (file)
@@ -35,72 +35,72 @@ class LocalFileTest extends MediaWikiTestCase {
                $this->file_lc = $this->repo_lc->newFile( 'test!' );
        }
 
-       function testGetHashPath() {
+       public function testGetHashPath() {
                $this->assertEquals( '', $this->file_hl0->getHashPath() );
                $this->assertEquals( 'a/a2/', $this->file_hl2->getHashPath() );
                $this->assertEquals( 'c/c4/', $this->file_lc->getHashPath() );
        }
 
-       function testGetRel() {
+       public function testGetRel() {
                $this->assertEquals( 'Test!', $this->file_hl0->getRel() );
                $this->assertEquals( 'a/a2/Test!', $this->file_hl2->getRel() );
                $this->assertEquals( 'c/c4/test!', $this->file_lc->getRel() );
        }
 
-       function testGetUrlRel() {
+       public function testGetUrlRel() {
                $this->assertEquals( 'Test%21', $this->file_hl0->getUrlRel() );
                $this->assertEquals( 'a/a2/Test%21', $this->file_hl2->getUrlRel() );
                $this->assertEquals( 'c/c4/test%21', $this->file_lc->getUrlRel() );
        }
 
-       function testGetArchivePath() {
+       public function testGetArchivePath() {
                $this->assertEquals( 'mwstore://local-backend/test-public/archive', $this->file_hl0->getArchivePath() );
                $this->assertEquals( 'mwstore://local-backend/test-public/archive/a/a2', $this->file_hl2->getArchivePath() );
                $this->assertEquals( 'mwstore://local-backend/test-public/archive/!', $this->file_hl0->getArchivePath( '!' ) );
                $this->assertEquals( 'mwstore://local-backend/test-public/archive/a/a2/!', $this->file_hl2->getArchivePath( '!' ) );
        }
 
-       function testGetThumbPath() {
+       public function testGetThumbPath() {
                $this->assertEquals( 'mwstore://local-backend/test-thumb/Test!', $this->file_hl0->getThumbPath() );
                $this->assertEquals( 'mwstore://local-backend/test-thumb/a/a2/Test!', $this->file_hl2->getThumbPath() );
                $this->assertEquals( 'mwstore://local-backend/test-thumb/Test!/x', $this->file_hl0->getThumbPath( 'x' ) );
                $this->assertEquals( 'mwstore://local-backend/test-thumb/a/a2/Test!/x', $this->file_hl2->getThumbPath( 'x' ) );
        }
 
-       function testGetArchiveUrl() {
+       public function testGetArchiveUrl() {
                $this->assertEquals( '/testurl/archive', $this->file_hl0->getArchiveUrl() );
                $this->assertEquals( '/testurl/archive/a/a2', $this->file_hl2->getArchiveUrl() );
                $this->assertEquals( '/testurl/archive/%21', $this->file_hl0->getArchiveUrl( '!' ) );
                $this->assertEquals( '/testurl/archive/a/a2/%21', $this->file_hl2->getArchiveUrl( '!' ) );
        }
 
-       function testGetThumbUrl() {
+       public function testGetThumbUrl() {
                $this->assertEquals( '/testurl/thumb/Test%21', $this->file_hl0->getThumbUrl() );
                $this->assertEquals( '/testurl/thumb/a/a2/Test%21', $this->file_hl2->getThumbUrl() );
                $this->assertEquals( '/testurl/thumb/Test%21/x', $this->file_hl0->getThumbUrl( 'x' ) );
                $this->assertEquals( '/testurl/thumb/a/a2/Test%21/x', $this->file_hl2->getThumbUrl( 'x' ) );
        }
 
-       function testGetArchiveVirtualUrl() {
+       public function testGetArchiveVirtualUrl() {
                $this->assertEquals( 'mwrepo://test/public/archive', $this->file_hl0->getArchiveVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/public/archive/a/a2', $this->file_hl2->getArchiveVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/public/archive/%21', $this->file_hl0->getArchiveVirtualUrl( '!' ) );
                $this->assertEquals( 'mwrepo://test/public/archive/a/a2/%21', $this->file_hl2->getArchiveVirtualUrl( '!' ) );
        }
 
-       function testGetThumbVirtualUrl() {
+       public function testGetThumbVirtualUrl() {
                $this->assertEquals( 'mwrepo://test/thumb/Test%21', $this->file_hl0->getThumbVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/thumb/a/a2/Test%21', $this->file_hl2->getThumbVirtualUrl() );
                $this->assertEquals( 'mwrepo://test/thumb/Test%21/%21', $this->file_hl0->getThumbVirtualUrl( '!' ) );
                $this->assertEquals( 'mwrepo://test/thumb/a/a2/Test%21/%21', $this->file_hl2->getThumbVirtualUrl( '!' ) );
        }
 
-       function testGetUrl() {
+       public function testGetUrl() {
                $this->assertEquals( '/testurl/Test%21', $this->file_hl0->getUrl() );
                $this->assertEquals( '/testurl/a/a2/Test%21', $this->file_hl2->getUrl() );
        }
 
-       function testWfLocalFile() {
+       public function testWfLocalFile() {
                $file = wfLocalFile( "File:Some_file_that_probably_doesn't exist.png" );
                $this->assertThat( $file, $this->isInstanceOf( 'LocalFile' ), 'wfLocalFile() returns LocalFile for valid Titles' );
        }
index a44f69e..d86f2c9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 class MWFunctionTest extends MediaWikiTestCase {
-       function testNewObjFunction() {
+       public function testNewObjFunction() {
                $arg1 = 'Foo';
                $arg2 = 'Bar';
                $arg3 = array( 'Baz' );
index 1ba2d40..1e18f97 100644 (file)
@@ -10,7 +10,7 @@ class MessageTest extends MediaWikiLangTestCase {
                ) );
        }
 
-       function testExists() {
+       public function testExists() {
                $this->assertTrue( wfMessage( 'mainpage' )->exists() );
                $this->assertTrue( wfMessage( 'mainpage' )->params( array() )->exists() );
                $this->assertTrue( wfMessage( 'mainpage' )->rawParams( 'foo', 123 )->exists() );
@@ -19,7 +19,7 @@ class MessageTest extends MediaWikiLangTestCase {
                $this->assertFalse( wfMessage( 'i-dont-exist-evar' )->rawParams( 'foo', 123 )->exists() );
        }
 
-       function testKey() {
+       public function testKey() {
                $this->assertInstanceOf( 'Message', wfMessage( 'mainpage' ) );
                $this->assertInstanceOf( 'Message', wfMessage( 'i-dont-exist-evar' ) );
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->text() );
@@ -28,28 +28,28 @@ class MessageTest extends MediaWikiLangTestCase {
                $this->assertEquals( '&lt;i-dont-exist-evar&gt;', wfMessage( 'i-dont-exist-evar' )->escaped() );
        }
 
-       function testInLanguage() {
+       public function testInLanguage() {
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( 'en' )->text() );
                $this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( 'ru' )->text() );
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'en' ) )->text() );
                $this->assertEquals( 'Заглавная страница', wfMessage( 'mainpage' )->inLanguage( Language::factory( 'ru' ) )->text() );
        }
 
-       function testMessageParams() {
+       public function testMessageParams() {
                $this->assertEquals( 'Return to $1.', wfMessage( 'returnto' )->text() );
                $this->assertEquals( 'Return to $1.', wfMessage( 'returnto', array() )->text() );
                $this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', 'foo', 'bar' )->text() );
                $this->assertEquals( 'You have foo (bar).', wfMessage( 'youhavenewmessages', array( 'foo', 'bar' ) )->text() );
        }
 
-       function testMessageParamSubstitution() {
+       public function testMessageParamSubstitution() {
                $this->assertEquals( '(Заглавная страница)', wfMessage( 'parentheses', 'Заглавная страница' )->plain() );
                $this->assertEquals( '(Заглавная страница $1)', wfMessage( 'parentheses', 'Заглавная страница $1' )->plain() );
                $this->assertEquals( '(Заглавная страница)', wfMessage( 'parentheses' )->rawParams( 'Заглавная страница' )->plain() );
                $this->assertEquals( '(Заглавная страница $1)', wfMessage( 'parentheses' )->rawParams( 'Заглавная страница $1' )->plain() );
        }
 
-       function testDeliciouslyManyParams() {
+       public function testDeliciouslyManyParams() {
                $msg = new RawMessage( '$1$2$3$4$5$6$7$8$9$10$11$12' );
                // One less than above has placeholders
                $params = array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k' );
@@ -60,7 +60,7 @@ class MessageTest extends MediaWikiLangTestCase {
         * FIXME: This should not need database, but Language#formatExpiry does (bug 55912)
         * @group Database
         */
-       function testMessageParamTypes() {
+       public function testMessageParamTypes() {
                $lang = Language::factory( 'en' );
 
                $msg = new RawMessage( '$1' );
@@ -106,13 +106,13 @@ class MessageTest extends MediaWikiLangTestCase {
                );
        }
 
-       function testInContentLanguageDisabled() {
+       public function testInContentLanguageDisabled() {
                $this->setMwGlobals( 'wgLang', Language::factory( 'fr' ) );
 
                $this->assertEquals( 'Main Page', wfMessage( 'mainpage' )->inContentLanguage()->plain(), 'ForceUIMsg disabled' );
        }
 
-       function testInContentLanguageEnabled() {
+       public function testInContentLanguageEnabled() {
                $this->setMwGlobals( array(
                        'wgLang' => Language::factory( 'fr' ),
                        'wgForceUIMsgAsContentMsg' => array( 'mainpage' ),
@@ -124,7 +124,7 @@ class MessageTest extends MediaWikiLangTestCase {
        /**
         * @expectedException MWException
         */
-       function testInLanguageThrows() {
+       public function testInLanguageThrows() {
                wfMessage( 'foo' )->inLanguage( 123 );
        }
 }
index 8a88191..8516a4c 100644 (file)
@@ -33,7 +33,7 @@ class TestSample extends MediaWikiLangTestCase {
         * "Agile Documentation" at
         * http://www.phpunit.de/manual/3.4/en/other-uses-for-tests.html
         */
-       function testTitleObjectStringConversion() {
+       public function testTitleObjectStringConversion() {
                $title = Title::newFromText( "text" );
                $this->assertInstanceOf( 'Title', $title, "Title creation" );
                $this->assertEquals( "Text", $title, "Automatic string conversion" );
@@ -98,7 +98,7 @@ class TestSample extends MediaWikiLangTestCase {
         * @expectedException MWException object
         * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.expectedException
         */
-       function testTitleObjectFromObject() {
+       public function testTitleObjectFromObject() {
                $title = Title::newFromText( Title::newFromText( "test" ) );
                $this->assertEquals( "Test", $title->isLocal() );
        }
index b222812..89759e5 100644 (file)
@@ -9,7 +9,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
-       function testIsUtf8WithMbstring( $expected, $string ) {
+       public function testIsUtf8WithMbstring( $expected, $string ) {
                if ( !function_exists( 'mb_check_encoding' ) ) {
                        $this->markTestSkipped( 'Test requires the mbstring PHP extension' );
                }
@@ -27,7 +27,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         * @covers StringUtils::isUtf8
         * @dataProvider provideStringsForIsUtf8Check
         */
-       function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
+       public function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
                $this->assertEquals( $expected,
                        StringUtils::isUtf8( $string, /** disable mbstring: */true ),
                        'Testing string "' . $this->escaped( $string ) . '" with pure PHP implementation'
index 906aebd..fb63a56 100644 (file)
@@ -10,7 +10,7 @@ class TemplateCategoriesTest extends MediaWikiLangTestCase {
        /**
         * @covers Title::getParentCategories
         */
-       function testTemplateCategories() {
+       public function testTemplateCategories() {
                $title = Title::newFromText( "Categorized from template" );
                $page = WikiPage::factory( $title );
                $user = new User();
index a600188..f8ed14b 100644 (file)
@@ -22,7 +22,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @dataProvider provideDetectServer
         * @covers WebRequest::detectServer
         */
-       function testDetectServer( $expected, $input, $description ) {
+       public function testDetectServer( $expected, $input, $description ) {
                $_SERVER = $input;
                $result = WebRequest::detectServer();
                $this->assertEquals( $expected, $result, $description );
@@ -106,7 +106,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @dataProvider provideGetIP
         * @covers WebRequest::getIP
         */
-       function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
+       public function testGetIP( $expected, $input, $squid, $xffList, $private, $description ) {
                $_SERVER = $input;
                $this->setMwGlobals( array(
                        'wgSquidServersNoPurge' => $squid,
@@ -276,7 +276,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers WebRequest::getIP
         */
-       function testGetIpLackOfRemoteAddrThrowAnException() {
+       public function testGetIpLackOfRemoteAddrThrowAnException() {
                $request = new WebRequest();
                # Next call throw an exception about lacking an IP
                $request->getIP();
@@ -302,7 +302,7 @@ class WebRequestTest extends MediaWikiTestCase {
         * @dataProvider provideLanguageData
         * @covers WebRequest::getAcceptLang
         */
-       function testAcceptLang( $acceptLanguageHeader, $expectedLanguages, $description ) {
+       public function testAcceptLang( $acceptLanguageHeader, $expectedLanguages, $description ) {
                $_SERVER = array( 'HTTP_ACCEPT_LANGUAGE' => $acceptLanguageHeader );
                $request = new WebRequest();
                $this->assertSame( $request->getAcceptLang(), $expectedLanguages, $description );
index a0b33ee..8205029 100644 (file)
@@ -57,7 +57,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementOpen() {
+       public function testElementOpen() {
                $this->assertEquals(
                        '<element>',
                        Xml::element( 'element', null, null ),
@@ -68,7 +68,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementEmpty() {
+       public function testElementEmpty() {
                $this->assertEquals(
                        '<element />',
                        Xml::element( 'element', null, '' ),
@@ -79,7 +79,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::input
         */
-       function testElementInputCanHaveAValueOfZero() {
+       public function testElementInputCanHaveAValueOfZero() {
                $this->assertEquals(
                        '<input name="name" value="0" />',
                        Xml::input( 'name', false, 0 ),
@@ -90,7 +90,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementEscaping() {
+       public function testElementEscaping() {
                $this->assertEquals(
                        '<element>hello &lt;there&gt; you &amp; you</element>',
                        Xml::element( 'element', null, 'hello <there> you & you' ),
@@ -110,7 +110,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::element
         */
-       function testElementAttributes() {
+       public function testElementAttributes() {
                $this->assertEquals(
                        '<element key="value" <>="&lt;&gt;">',
                        Xml::element( 'element', array( 'key' => 'value', '<>' => '<>' ), null ),
@@ -121,7 +121,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::openElement
         */
-       function testOpenElement() {
+       public function testOpenElement() {
                $this->assertEquals(
                        '<element k="v">',
                        Xml::openElement( 'element', array( 'k' => 'v' ) ),
@@ -132,7 +132,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::closeElement
         */
-       function testCloseElement() {
+       public function testCloseElement() {
                $this->assertEquals( '</element>', Xml::closeElement( 'element' ), 'closeElement() shortcut' );
        }
 
@@ -222,7 +222,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::textarea
         */
-       function testTextareaNoContent() {
+       public function testTextareaNoContent() {
                $this->assertEquals(
                        '<textarea name="name" id="name" cols="40" rows="5"></textarea>',
                        Xml::textarea( 'name', '' ),
@@ -233,7 +233,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::textarea
         */
-       function testTextareaAttribs() {
+       public function testTextareaAttribs() {
                $this->assertEquals(
                        '<textarea name="name" id="name" cols="20" rows="10">&lt;txt&gt;</textarea>',
                        Xml::textarea( 'name', '<txt>', 20, 10 ),
@@ -244,7 +244,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::label
         */
-       function testLabelCreation() {
+       public function testLabelCreation() {
                $this->assertEquals(
                        '<label for="id">name</label>',
                        Xml::label( 'name', 'id' ),
@@ -255,7 +255,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::label
         */
-       function testLabelAttributeCanOnlyBeClassOrTitle() {
+       public function testLabelAttributeCanOnlyBeClassOrTitle() {
                $this->assertEquals(
                        '<label for="id">name</label>',
                        Xml::label( 'name', 'id', array( 'generated' => true ) ),
@@ -287,7 +287,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::languageSelector
         */
-       function testLanguageSelector() {
+       public function testLanguageSelector() {
                $select = Xml::languageSelector( 'en', true, null,
                        array( 'id' => 'testlang' ), wfMessage( 'yourlanguage' ) );
                $this->assertEquals(
@@ -299,7 +299,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::escapeJsString
         */
-       function testEscapeJsStringSpecialChars() {
+       public function testEscapeJsStringSpecialChars() {
                $this->assertEquals(
                        '\\\\\r\n',
                        Xml::escapeJsString( "\\\r\n" ),
@@ -310,7 +310,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarBoolean() {
+       public function testEncodeJsVarBoolean() {
                $this->assertEquals(
                        'true',
                        Xml::encodeJsVar( true ),
@@ -321,7 +321,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarNull() {
+       public function testEncodeJsVarNull() {
                $this->assertEquals(
                        'null',
                        Xml::encodeJsVar( null ),
@@ -332,7 +332,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarArray() {
+       public function testEncodeJsVarArray() {
                $this->assertEquals(
                        '["a",1]',
                        Xml::encodeJsVar( array( 'a', 1 ) ),
@@ -348,7 +348,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarObject() {
+       public function testEncodeJsVarObject() {
                $this->assertEquals(
                        '{"a":"a","b":1}',
                        Xml::encodeJsVar( (object)array( 'a' => 'a', 'b' => 1 ) ),
@@ -359,7 +359,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarInt() {
+       public function testEncodeJsVarInt() {
                $this->assertEquals(
                        '123456',
                        Xml::encodeJsVar( 123456 ),
@@ -370,7 +370,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarFloat() {
+       public function testEncodeJsVarFloat() {
                $this->assertEquals(
                        '1.23456',
                        Xml::encodeJsVar( 1.23456 ),
@@ -381,7 +381,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarIntString() {
+       public function testEncodeJsVarIntString() {
                $this->assertEquals(
                        '"123456"',
                        Xml::encodeJsVar( '123456' ),
@@ -392,7 +392,7 @@ class XmlTest extends MediaWikiTestCase {
        /**
         * @covers Xml::encodeJsVar
         */
-       function testEncodeJsVarFloatString() {
+       public function testEncodeJsVarFloatString() {
                $this->assertEquals(
                        '"1.23456"',
                        Xml::encodeJsVar( '1.23456' ),
index 7f436cd..2627a41 100644 (file)
@@ -29,21 +29,21 @@ class ZipDirectoryReaderTest extends MediaWikiTestCase {
                $this->assertTrue( $status->isOK(), $assertMessage );
        }
 
-       function testEmpty() {
+       public function testEmpty() {
                $this->readZipAssertSuccess( 'empty.zip', 'Empty zip' );
        }
 
-       function testMultiDisk0() {
+       public function testMultiDisk0() {
                $this->readZipAssertError( 'split.zip', 'zip-unsupported',
                        'Split zip error' );
        }
 
-       function testNoSignature() {
+       public function testNoSignature() {
                $this->readZipAssertError( 'nosig.zip', 'zip-wrong-format',
                        'No signature should give "wrong format" error' );
        }
 
-       function testSimple() {
+       public function testSimple() {
                $this->readZipAssertSuccess( 'class.zip', 'Simple ZIP' );
                $this->assertEquals( $this->entries, array( array(
                        'name' => 'Class.class',
@@ -52,33 +52,33 @@ class ZipDirectoryReaderTest extends MediaWikiTestCase {
                ) ) );
        }
 
-       function testBadCentralEntrySignature() {
+       public function testBadCentralEntrySignature() {
                $this->readZipAssertError( 'wrong-central-entry-sig.zip', 'zip-bad',
                        'Bad central entry error' );
        }
 
-       function testTrailingBytes() {
+       public function testTrailingBytes() {
                $this->readZipAssertError( 'trail.zip', 'zip-bad',
                        'Trailing bytes error' );
        }
 
-       function testWrongCDStart() {
+       public function testWrongCDStart() {
                $this->readZipAssertError( 'wrong-cd-start-disk.zip', 'zip-unsupported',
                        'Wrong CD start disk error' );
        }
 
 
-       function testCentralDirectoryGap() {
+       public function testCentralDirectoryGap() {
                $this->readZipAssertError( 'cd-gap.zip', 'zip-bad',
                        'CD gap error' );
        }
 
-       function testCentralDirectoryTruncated() {
+       public function testCentralDirectoryTruncated() {
                $this->readZipAssertError( 'cd-truncated.zip', 'zip-bad',
                        'CD truncated error (should hit unpack() overrun)' );
        }
 
-       function testLooksLikeZip64() {
+       public function testLooksLikeZip64() {
                $this->readZipAssertError( 'looks-like-zip64.zip', 'zip-unsupported',
                        'A file which looks like ZIP64 but isn\'t, should give error' );
        }
index 50638ca..68f80ac 100644 (file)
@@ -20,7 +20,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * a bit slow. Raise the default timeout.
         * @group medium
         */
-       function testValid() {
+       public function testValid() {
                global $wgServer;
 
                if ( !isset( $wgServer ) ) {
@@ -109,7 +109,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * Make sure requests with no names are invalid.
         * @expectedException UsageException
         */
-       function testNoName() {
+       public function testNoName() {
                $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'token' => LoginForm::getCreateaccountToken(),
@@ -121,7 +121,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * Make sure requests with no password are invalid.
         * @expectedException UsageException
         */
-       function testNoPassword() {
+       public function testNoPassword() {
                $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'name' => 'testName',
@@ -133,7 +133,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * Make sure requests with existing users are invalid.
         * @expectedException UsageException
         */
-       function testExistingUser() {
+       public function testExistingUser() {
                $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'name' => 'Apitestsysop',
@@ -147,7 +147,7 @@ class ApiCreateAccountTest extends ApiTestCase {
         * Make sure requests with invalid emails are invalid.
         * @expectedException UsageException
         */
-       function testInvalidEmail() {
+       public function testInvalidEmail() {
                $this->doApiRequest( array(
                        'action' => 'createaccount',
                        'name' => 'Test User',
index d0eb18a..8afb748 100644 (file)
@@ -34,7 +34,7 @@ class ApiBlockTest extends ApiTestCase {
         * Which made the Block/Unblock API to actually verify the token
         * previously always considered valid (bug 34212).
         */
-       function testMakeNormalBlock() {
+       public function testMakeNormalBlock() {
                $tokens = $this->getTokens();
 
                $user = User::newFromName( 'UTApiBlockee' );
@@ -70,7 +70,7 @@ class ApiBlockTest extends ApiTestCase {
         * @dataProvider provideBlockUnblockAction
         * @expectedException UsageException
         */
-       function testBlockingActionWithNoToken( $action ) {
+       public function testBlockingActionWithNoToken( $action ) {
                $this->doApiRequest(
                        array(
                                'action' => $action,
index 3926e85..0c49b12 100644 (file)
@@ -43,7 +43,7 @@ class ApiEditPageTest extends ApiTestCase {
                parent::tearDown();
        }
 
-       function testEdit() {
+       public function testEdit() {
                $name = 'Help:ApiEditPageTest_testEdit'; // assume Help namespace to default to wikitext
 
                // -- test new page --------------------------------------------
@@ -97,7 +97,7 @@ class ApiEditPageTest extends ApiTestCase {
                );
        }
 
-       function testNonTextEdit() {
+       public function testNonTextEdit() {
                $name = 'Dummy:ApiEditPageTest_testNonTextEdit';
                $data = serialize( 'some bla bla text' );
 
@@ -150,7 +150,7 @@ class ApiEditPageTest extends ApiTestCase {
        /**
         * @dataProvider provideEditAppend
         */
-       function testEditAppend( $text, $op, $append, $expected ) {
+       public function testEditAppend( $text, $op, $append, $expected ) {
                static $count = 0;
                $count++;
 
@@ -196,7 +196,7 @@ class ApiEditPageTest extends ApiTestCase {
        /**
         * Test editing of sections
         */
-       function testEditSection() {
+       public function testEditSection() {
                $name = 'Help:ApiEditPageTest_testEditSection';
                $page = WikiPage::factory( Title::newFromText( $name ) );
                $text = "==section 1==\ncontent 1\n==section 2==\ncontent2";
@@ -233,7 +233,7 @@ class ApiEditPageTest extends ApiTestCase {
         * page that doesn't exist (bug 52830) and one that
         * does exist
         */
-       function testEditNewSection() {
+       public function testEditNewSection() {
                $name = 'Help:ApiEditPageTest_testEditNewSection';
 
                // Test on a page that does not already exist
@@ -266,7 +266,7 @@ class ApiEditPageTest extends ApiTestCase {
                $this->assertEquals( $text, "== header ==\n\ntest\n\n== header ==\n\ntest" );
        }
 
-       function testEditConflict() {
+       public function testEditConflict() {
                static $count = 0;
                $count++;
 
@@ -302,7 +302,7 @@ class ApiEditPageTest extends ApiTestCase {
                }
        }
 
-       function testEditConflict_redirect() {
+       public function testEditConflict_redirect() {
                static $count = 0;
                $count++;
 
@@ -358,7 +358,7 @@ class ApiEditPageTest extends ApiTestCase {
                }
        }
 
-       function testEditConflict_bug41990() {
+       public function testEditConflict_bug41990() {
                static $count = 0;
                $count++;
 
index b408875..2d714e6 100644 (file)
@@ -12,7 +12,7 @@ class ApiParseTest extends ApiTestCase {
                $this->doLogin();
        }
 
-       function testParseNonexistentPage() {
+       public function testParseNonexistentPage() {
                $somePage = mt_rand();
 
                try {
index 881eb3f..28b5ff4 100644 (file)
@@ -15,7 +15,7 @@ class ApiPurgeTest extends ApiTestCase {
        /**
         * @group Broken
         */
-       function testPurgeMainPage() {
+       public function testPurgeMainPage() {
                if ( !Title::newFromText( 'UTPage' )->exists() ) {
                        $this->markTestIncomplete( "The article [[UTPage]] does not exist" );
                }
index 5106be5..472f8c4 100644 (file)
@@ -7,7 +7,7 @@
  */
 class ApiTest extends ApiTestCase {
 
-       function testRequireOnlyOneParameterDefault() {
+       public function testRequireOnlyOneParameterDefault() {
                $mock = new MockApi();
 
                $this->assertEquals(
@@ -18,7 +18,7 @@ class ApiTest extends ApiTestCase {
        /**
         * @expectedException UsageException
         */
-       function testRequireOnlyOneParameterZero() {
+       public function testRequireOnlyOneParameterZero() {
                $mock = new MockApi();
 
                $this->assertEquals(
@@ -29,7 +29,7 @@ class ApiTest extends ApiTestCase {
        /**
         * @expectedException UsageException
         */
-       function testRequireOnlyOneParameterTrue() {
+       public function testRequireOnlyOneParameterTrue() {
                $mock = new MockApi();
 
                $this->assertEquals(
@@ -43,7 +43,7 @@ class ApiTest extends ApiTestCase {
         *
         * @expectedException UsageException
         */
-       function testApi() {
+       public function testApi() {
                $api = new ApiMain(
                        new FauxRequest( array( 'action' => 'help', 'format' => 'xml' ) )
                );
@@ -61,14 +61,14 @@ class ApiTest extends ApiTestCase {
        /**
         * Test result of attempted login with an empty username
         */
-       function testApiLoginNoName() {
+       public function testApiLoginNoName() {
                $data = $this->doApiRequest( array( 'action' => 'login',
                        'lgname' => '', 'lgpassword' => self::$users['sysop']->password,
                ) );
                $this->assertEquals( 'NoName', $data[0]['login']['result'] );
        }
 
-       function testApiLoginBadPass() {
+       public function testApiLoginBadPass() {
                global $wgServer;
 
                $user = self::$users['sysop'];
@@ -109,7 +109,7 @@ class ApiTest extends ApiTestCase {
                $this->assertEquals( "WrongPass", $a );
        }
 
-       function testApiLoginGoodPass() {
+       public function testApiLoginGoodPass() {
                global $wgServer;
 
                if ( !isset( $wgServer ) ) {
@@ -155,7 +155,7 @@ class ApiTest extends ApiTestCase {
        /**
         * @group Broken
         */
-       function testApiGotCookie() {
+       public function testApiGotCookie() {
                $this->markTestIncomplete( "The server can't do external HTTP requests, and the internal one won't give cookies" );
 
                global $wgServer, $wgScriptPath;
@@ -201,7 +201,7 @@ class ApiTest extends ApiTestCase {
                return $cj;
        }
 
-       function testRunLogin() {
+       public function testRunLogin() {
                $sysopUser = self::$users['sysop'];
                $data = $this->doApiRequest( array(
                        'action' => 'login',
@@ -227,7 +227,7 @@ class ApiTest extends ApiTestCase {
                return $data;
        }
 
-       function testGettingToken() {
+       public function testGettingToken() {
                foreach ( self::$users as $user ) {
                        $this->runTokenTest( $user );
                }
index ae3a5e9..1540af5 100644 (file)
@@ -31,7 +31,7 @@ class ApiUploadTest extends ApiTestCaseUpload {
         * Testing login
         * XXX this is a funny way of getting session context
         */
-       function testLogin() {
+       public function testLogin() {
                $user = self::$users['uploader'];
 
                $params = array(
index 8253989..028ea9f 100644 (file)
@@ -18,7 +18,7 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         */
-       function testWatchEdit() {
+       public function testWatchEdit() {
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(
@@ -37,7 +37,7 @@ class ApiWatchTest extends ApiTestCase {
        /**
         * @depends testWatchEdit
         */
-       function testWatchClear() {
+       public function testWatchClear() {
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(
@@ -67,7 +67,7 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         */
-       function testWatchProtect() {
+       public function testWatchProtect() {
                $tokens = $this->getTokens();
 
                $data = $this->doApiRequest( array(
@@ -85,7 +85,7 @@ class ApiWatchTest extends ApiTestCase {
 
        /**
         */
-       function testGetRollbackToken() {
+       public function testGetRollbackToken() {
                $this->getTokens();
 
                if ( !Title::newFromText( 'Help:UTPage' )->exists() ) {
@@ -121,7 +121,7 @@ class ApiWatchTest extends ApiTestCase {
         *
         * @depends testGetRollbackToken
         */
-       function testWatchRollback( $data ) {
+       public function testWatchRollback( $data ) {
                $keys = array_keys( $data[0]['query']['pages'] );
                $key = array_pop( $keys );
                $pageinfo = $data[0]['query']['pages'][$key];
index 802a0e1..a0bbb2d 100644 (file)
@@ -7,7 +7,7 @@
  */
 class ApiFormatPhpTest extends ApiFormatTestBase {
 
-       function testValidPhpSyntax() {
+       public function testValidPhpSyntax() {
 
                $data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
 
index 7f5fe91..1bca225 100644 (file)
@@ -10,7 +10,7 @@ class ApiQueryRevisionsTest extends ApiTestCase {
        /**
         * @group medium
         */
-       function testContentComesWithContentModelAndFormat() {
+       public function testContentComesWithContentModelAndFormat() {
                $pageName = 'Help:' . __METHOD__;
                $title = Title::newFromText( $pageName );
                $page = WikiPage::factory( $title );
index bc01ec2..f564555 100644 (file)
@@ -12,7 +12,7 @@ class ApiQueryTest extends ApiTestCase {
                $this->doLogin();
        }
 
-       function testTitlesGetNormalized() {
+       public function testTitlesGetNormalized() {
 
                global $wgMetaNamespace;
 
@@ -43,7 +43,7 @@ class ApiQueryTest extends ApiTestCase {
                );
        }
 
-       function testTitlesAreRejectedIfInvalid() {
+       public function testTitlesAreRejectedIfInvalid() {
                $title = false;
                while ( !$title || Title::newFromText( $title )->exists() ) {
                        $title = md5( mt_rand( 0, 10000 ) + rand( 0, 999000 ) );
index 2ac2942..ce2db5d 100644 (file)
@@ -48,7 +48,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
         * @dataProvider provideUserGenders
         * @covers GenderCache::getGenderOf
         */
-       function testUserName( $username, $expectedGender ) {
+       public function testUserName( $username, $expectedGender ) {
                $genderCache = GenderCache::singleton();
                $gender = $genderCache->getGenderOf( $username );
                $this->assertEquals( $gender, $expectedGender, "GenderCache normal" );
@@ -60,7 +60,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
         * @dataProvider provideUserGenders
         * @covers GenderCache::getGenderOf
         */
-       function testUserObjects( $username, $expectedGender ) {
+       public function testUserObjects( $username, $expectedGender ) {
                $genderCache = GenderCache::singleton();
                $user = User::newFromName( $username );
                $gender = $genderCache->getGenderOf( $user );
@@ -86,7 +86,7 @@ class GenderCacheTest extends MediaWikiLangTestCase {
         * @dataProvider provideStripSubpages
         * @covers GenderCache::getGenderOf
         */
-       function testStripSubpages( $pageWithSubpage, $expectedGender ) {
+       public function testStripSubpages( $pageWithSubpage, $expectedGender ) {
                $genderCache = GenderCache::singleton();
                $gender = $genderCache->getGenderOf( $pageWithSubpage );
                $this->assertEquals( $gender, $expectedGender, "GenderCache must strip of subpages" );
index 3559f15..803acf7 100644 (file)
@@ -84,7 +84,7 @@ class MessageCacheTest extends MediaWikiLangTestCase {
         *
         * @dataProvider provideMessagesForFallback
         */
-       function testMessageFallbacks( $message, $lang, $expectedContent ) {
+       public function testMessageFallbacks( $message, $lang, $expectedContent ) {
                $result = MessageCache::singleton()->get( $message, true, $lang );
                $this->assertEquals( $expectedContent, $result, "Message fallback failed." );
        }
@@ -112,7 +112,7 @@ class MessageCacheTest extends MediaWikiLangTestCase {
         *
         * @dataProvider provideMessagesForFullKeys
         */
-       function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
+       public function testFullKeyBehaviour( $message, $lang, $expectedContent ) {
                $result = MessageCache::singleton()->get( $message, true, $lang, true );
                $this->assertEquals( $expectedContent, $result, "Full key message fallback failed." );
        }
index 1c81ea7..d3793d8 100644 (file)
@@ -59,7 +59,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
        /**
         * Highlight diff between assertEquals and assertNotSame
         */
-       function testPhpUnitArrayEquality() {
+       public function testPhpUnitArrayEquality() {
                $one = array( 'A' => 1, 'B' => 2 );
                $two = array( 'B' => 2, 'A' => 1 );
                $this->assertEquals( $one, $two ); // ==
@@ -70,7 +70,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * @dataProvider provideInvalidConstructorArg
         * @expectedException MWException
         */
-       function testConstructorGivenInvalidValue( $maxSize ) {
+       public function testConstructorGivenInvalidValue( $maxSize ) {
                new ProcessCacheLRUTestable( $maxSize );
        }
 
@@ -88,7 +88,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                );
        }
 
-       function testAddAndGetAKey() {
+       public function testAddAndGetAKey() {
                $oneCache = new ProcessCacheLRUTestable( 1 );
                $this->assertCacheEmpty( $oneCache );
 
@@ -99,7 +99,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                $this->assertEquals( 'value1', $oneCache->get( 'cache-key', 'prop1' ) );
        }
 
-       function testDeleteOldKey() {
+       public function testDeleteOldKey() {
                $oneCache = new ProcessCacheLRUTestable( 1 );
                $this->assertCacheEmpty( $oneCache );
 
@@ -117,7 +117,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * @param $cacheMaxEntries Maximum entry the created cache will hold
         * @param $entryToFill Number of entries to insert in the created cache.
         */
-       function testFillingCache( $cacheMaxEntries, $entryToFill, $msg = '' ) {
+       public function testFillingCache( $cacheMaxEntries, $entryToFill, $msg = '' ) {
                $cache = new ProcessCacheLRUTestable( $cacheMaxEntries );
                $this->fillCache( $cache, $entryToFill );
 
@@ -145,7 +145,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * Create a cache with only one remaining entry then update
         * the first inserted entry. Should bump it to the top.
         */
-       function testReplaceExistingKeyShouldBumpEntryToTop() {
+       public function testReplaceExistingKeyShouldBumpEntryToTop() {
                $maxEntries = 3;
 
                $cache = new ProcessCacheLRUTestable( $maxEntries );
@@ -164,7 +164,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                );
        }
 
-       function testRecentlyAccessedKeyStickIn() {
+       public function testRecentlyAccessedKeyStickIn() {
                $cache = new ProcessCacheLRUTestable( 2 );
                $cache->set( 'first', 'prop1', 'value1' );
                $cache->set( 'second', 'prop2', 'value2' );
@@ -183,7 +183,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
         * Given a cache having 1,2,3 as key, updating 2 should bump 2 to
         * the top of the queue with the new value: 1,3,2* (* = updated).
         */
-       function testReplaceExistingKeyInAFullCacheShouldBumpToTop() {
+       public function testReplaceExistingKeyInAFullCacheShouldBumpToTop() {
                $maxEntries = 3;
 
                $cache = new ProcessCacheLRUTestable( $maxEntries );
@@ -204,7 +204,7 @@ class ProcessCacheLRUTest extends MediaWikiTestCase {
                );
        }
 
-       function testBumpExistingKeyToTop() {
+       public function testBumpExistingKeyToTop() {
                $cache = new ProcessCacheLRUTestable( 3 );
                $this->fillCache( $cache, 3 );
 
index 7d7a2bd..134f856 100644 (file)
@@ -60,7 +60,7 @@ class DatabaseMysqlBaseTest extends MediaWikiTestCase {
         * @dataProvider provideDiapers
         * @covers DatabaseMysqlBase::addIdentifierQuotes
         */
-       function testAddIdentifierQuotes( $expected, $in ) {
+       public function testAddIdentifierQuotes( $expected, $in ) {
                $db = new FakeDatabaseMysqlBase();
                $quoted = $db->addIdentifierQuotes( $in );
                $this->assertEquals($expected, $quoted);
index 726d63a..bdd567e 100644 (file)
@@ -27,7 +27,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideSelect
         * @covers DatabaseBase::select
         */
-       function testSelect( $sql, $sqlText ) {
+       public function testSelect( $sql, $sqlText ) {
                $this->database->select(
                        $sql['tables'],
                        $sql['fields'],
@@ -129,7 +129,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUpdate
         * @covers DatabaseBase::update
         */
-       function testUpdate( $sql, $sqlText ) {
+       public function testUpdate( $sql, $sqlText ) {
                $this->database->update(
                        $sql['table'],
                        $sql['values'],
@@ -181,7 +181,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideDelete
         * @covers DatabaseBase::delete
         */
-       function testDelete( $sql, $sqlText ) {
+       public function testDelete( $sql, $sqlText ) {
                $this->database->delete(
                        $sql['table'],
                        $sql['conds'],
@@ -214,7 +214,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUpsert
         * @covers DatabaseBase::upsert
         */
-       function testUpsert( $sql, $sqlText ) {
+       public function testUpsert( $sql, $sqlText ) {
                $this->database->upsert(
                        $sql['table'],
                        $sql['rows'],
@@ -250,7 +250,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideDeleteJoin
         * @covers DatabaseBase::deleteJoin
         */
-       function testDeleteJoin( $sql, $sqlText ) {
+       public function testDeleteJoin( $sql, $sqlText ) {
                $this->database->deleteJoin(
                        $sql['delTable'],
                        $sql['joinTable'],
@@ -297,7 +297,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideInsert
         * @covers DatabaseBase::insert
         */
-       function testInsert( $sql, $sqlText ) {
+       public function testInsert( $sql, $sqlText ) {
                $this->database->insert(
                        $sql['table'],
                        $sql['rows'],
@@ -350,7 +350,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideInsertSelect
         * @covers DatabaseBase::insertSelect
         */
-       function testInsertSelect( $sql, $sqlText ) {
+       public function testInsertSelect( $sql, $sqlText ) {
                $this->database->insertSelect(
                        $sql['destTable'],
                        $sql['srcTable'],
@@ -413,7 +413,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideReplace
         * @covers DatabaseBase::replace
         */
-       function testReplace( $sql, $sqlText ) {
+       public function testReplace( $sql, $sqlText ) {
                $this->database->replace(
                        $sql['table'],
                        $sql['uniqueIndexes'],
@@ -528,7 +528,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideNativeReplace
         * @covers DatabaseBase::nativeReplace
         */
-       function testNativeReplace( $sql, $sqlText ) {
+       public function testNativeReplace( $sql, $sqlText ) {
                $this->database->nativeReplace(
                        $sql['table'],
                        $sql['rows'],
@@ -555,7 +555,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideConditional
         * @covers DatabaseBase::conditional
         */
-       function testConditional( $sql, $sqlText ) {
+       public function testConditional( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->conditional(
                        $sql['conds'],
                        $sql['true'],
@@ -596,7 +596,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideBuildConcat
         * @covers DatabaseBase::buildConcat
         */
-       function testBuildConcat( $stringList, $sqlText ) {
+       public function testBuildConcat( $stringList, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildConcat(
                        $stringList
                ) ), $sqlText );
@@ -619,7 +619,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideBuildLike
         * @covers DatabaseBase::buildLike
         */
-       function testBuildLike( $array, $sqlText ) {
+       public function testBuildLike( $array, $sqlText ) {
                $this->assertEquals( trim( $this->database->buildLike(
                        $array
                ) ), $sqlText );
@@ -650,7 +650,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
         * @dataProvider provideUnionQueries
         * @covers DatabaseBase::unionQueries
         */
-       function testUnionQueries( $sql, $sqlText ) {
+       public function testUnionQueries( $sql, $sqlText ) {
                $this->assertEquals( trim( $this->database->unionQueries(
                        $sql['sqls'],
                        $sql['all']
@@ -686,7 +686,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::commit
         */
-       function testTransactionCommit() {
+       public function testTransactionCommit() {
                $this->database->begin( __METHOD__ );
                $this->database->commit( __METHOD__ );
                $this->assertLastSql( 'BEGIN; COMMIT' );
@@ -695,7 +695,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::rollback
         */
-       function testTransactionRollback() {
+       public function testTransactionRollback() {
                $this->database->begin( __METHOD__ );
                $this->database->rollback( __METHOD__ );
                $this->assertLastSql( 'BEGIN; ROLLBACK' );
@@ -704,7 +704,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testDropTable() {
+       public function testDropTable() {
                $this->database->setExistingTables( array( 'table' ) );
                $this->database->dropTable( 'table', __METHOD__ );
                $this->assertLastSql( 'DROP TABLE table' );
@@ -713,7 +713,7 @@ class DatabaseSQLTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testDropNonExistingTable() {
+       public function testDropNonExistingTable() {
                $this->assertFalse(
                        $this->database->dropTable( 'non_existing', __METHOD__ )
                );
index f151fb2..70ee946 100644 (file)
@@ -411,7 +411,7 @@ class DatabaseSqliteTest extends MediaWikiTestCase {
                return $indexes;
        }
 
-       function testCaseInsensitiveLike() {
+       public function testCaseInsensitiveLike() {
                // TODO: Test this for all databases
                $db = new DatabaseSqliteStandalone( ':memory:' );
                $res = $db->query( 'SELECT "a" LIKE "A" AS a' );
index 5e8e7a4..301fc99 100644 (file)
@@ -26,7 +26,7 @@ class DatabaseTest extends MediaWikiTestCase {
        /**
         * @covers DatabaseBase::dropTable
         */
-       function testAddQuotesNull() {
+       public function testAddQuotesNull() {
                $check = "NULL";
                if ( $this->db->getType() === 'sqlite' || $this->db->getType() === 'oracle' ) {
                        $check = "''";
@@ -34,7 +34,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $check, $this->db->addQuotes( null ) );
        }
 
-       function testAddQuotesInt() {
+       public function testAddQuotesInt() {
                # returning just "1234" should be ok too, though...
                # maybe
                $this->assertEquals(
@@ -42,20 +42,20 @@ class DatabaseTest extends MediaWikiTestCase {
                        $this->db->addQuotes( 1234 ) );
        }
 
-       function testAddQuotesFloat() {
+       public function testAddQuotesFloat() {
                # returning just "1234.5678" would be ok too, though
                $this->assertEquals(
                        "'1234.5678'",
                        $this->db->addQuotes( 1234.5678 ) );
        }
 
-       function testAddQuotesString() {
+       public function testAddQuotesString() {
                $this->assertEquals(
                        "'string'",
                        $this->db->addQuotes( 'string' ) );
        }
 
-       function testAddQuotesStringQuote() {
+       public function testAddQuotesStringQuote() {
                $check = "'string''s cause trouble'";
                if ( $this->db->getType() === 'mysql' ) {
                        $check = "'string\'s cause trouble'";
@@ -115,21 +115,21 @@ class DatabaseTest extends MediaWikiTestCase {
                }
        }
 
-       function testTableNameLocal() {
+       public function testTableNameLocal() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename' ),
                        $this->db->tableName( 'tablename' )
                );
        }
 
-       function testTableNameRawLocal() {
+       public function testTableNameRawLocal() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', null, null, 'raw' ),
                        $this->db->tableName( 'tablename', 'raw' )
                );
        }
 
-       function testTableNameShared() {
+       public function testTableNameShared() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'sharedatabase', 'sh_' ),
                        $this->getSharedTableName( 'tablename', 'sharedatabase', 'sh_' )
@@ -141,7 +141,7 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       function testTableNameRawShared() {
+       public function testTableNameRawShared() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'sharedatabase', 'sh_', 'raw' ),
                        $this->getSharedTableName( 'tablename', 'sharedatabase', 'sh_', 'raw' )
@@ -153,21 +153,21 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       function testTableNameForeign() {
+       public function testTableNameForeign() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'databasename', '' ),
                        $this->db->tableName( 'databasename.tablename' )
                );
        }
 
-       function testTableNameRawForeign() {
+       public function testTableNameRawForeign() {
                $this->assertEquals(
                        $this->prefixAndQuote( 'tablename', 'databasename', '', 'raw' ),
                        $this->db->tableName( 'databasename.tablename', 'raw' )
                );
        }
 
-       function testFillPreparedEmpty() {
+       public function testFillPreparedEmpty() {
                $sql = $this->db->fillPrepared(
                        'SELECT * FROM interwiki', array() );
                $this->assertEquals(
@@ -175,7 +175,7 @@ class DatabaseTest extends MediaWikiTestCase {
                        $sql );
        }
 
-       function testFillPreparedQuestion() {
+       public function testFillPreparedQuestion() {
                $sql = $this->db->fillPrepared(
                        'SELECT * FROM cur WHERE cur_namespace=? AND cur_title=?',
                        array( 4, "Snicker's_paradox" ) );
@@ -187,7 +187,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $check, $sql );
        }
 
-       function testFillPreparedBang() {
+       public function testFillPreparedBang() {
                $sql = $this->db->fillPrepared(
                        'SELECT user_id FROM ! WHERE user_name=?',
                        array( '"user"', "Slash's Dot" ) );
@@ -199,7 +199,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $check, $sql );
        }
 
-       function testFillPreparedRaw() {
+       public function testFillPreparedRaw() {
                $sql = $this->db->fillPrepared(
                        "SELECT * FROM cur WHERE cur_title='This_\\&_that,_WTF\\?\\!'",
                        array( '"user"', "Slash's Dot" ) );
@@ -208,7 +208,7 @@ class DatabaseTest extends MediaWikiTestCase {
                        $sql );
        }
 
-       function testStoredFunctions() {
+       public function testStoredFunctions() {
                if ( !in_array( wfGetDB( DB_MASTER )->getType(), array( 'mysql', 'postgres' ) ) ) {
                        $this->markTestSkipped( 'MySQL or Postgres required' );
                }
@@ -226,7 +226,7 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 
-       function testUnknownTableCorruptsResults() {
+       public function testUnknownTableCorruptsResults() {
                $res = $this->db->select( 'page', '*', array( 'page_id' => 1 ) );
                $this->assertFalse( $this->db->tableExists( 'foobarbaz' ) );
                $this->assertInternalType( 'int', $res->numRows() );
index 9026cb9..6926b1c 100644 (file)
@@ -21,7 +21,7 @@ class MWDebugTest extends MediaWikiTestCase {
                parent::tearDown();
        }
 
-       function testAddLog() {
+       public function testAddLog() {
                MWDebug::log( 'logging a string' );
                $this->assertEquals(
                        array( array(
@@ -33,7 +33,7 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAddWarning() {
+       public function testAddWarning() {
                MWDebug::warning( 'Warning message' );
                $this->assertEquals(
                        array( array(
@@ -45,7 +45,7 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAvoidDuplicateDeprecations() {
+       public function testAvoidDuplicateDeprecations() {
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
 
@@ -56,7 +56,7 @@ class MWDebugTest extends MediaWikiTestCase {
                );
        }
 
-       function testAvoidNonConsecutivesDuplicateDeprecations() {
+       public function testAvoidNonConsecutivesDuplicateDeprecations() {
                MWDebug::deprecated( 'wfOldFunction', '1.0', 'component' );
                MWDebug::warning( 'some warning' );
                MWDebug::log( 'we could have logged something too' );
index b760e26..e3a7556 100644 (file)
@@ -6,7 +6,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionCanNotBeNull() {
+       public function testFileRepoConstructionOptionCanNotBeNull() {
                new FileRepo();
        }
 
@@ -14,7 +14,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
+       public function testFileRepoConstructionOptionCanNotBeAnEmptyArray() {
                new FileRepo( array() );
        }
 
@@ -22,7 +22,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionNeedNameKey() {
+       public function testFileRepoConstructionOptionNeedNameKey() {
                new FileRepo( array(
                        'backend' => 'foobar'
                ) );
@@ -32,7 +32,7 @@ class FileRepoTest extends MediaWikiTestCase {
         * @expectedException MWException
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionOptionNeedBackendKey() {
+       public function testFileRepoConstructionOptionNeedBackendKey() {
                new FileRepo( array(
                        'name' => 'foobar'
                ) );
@@ -41,7 +41,7 @@ class FileRepoTest extends MediaWikiTestCase {
        /**
         * @covers FileRepo::__construct
         */
-       function testFileRepoConstructionWithRequiredOptions() {
+       public function testFileRepoConstructionWithRequiredOptions() {
                $f = new FileRepo( array(
                        'name' => 'FileRepoTestRepository',
                        'backend' => new FSFileBackend( array(
index ea87ede..0e5f267 100644 (file)
@@ -9,7 +9,7 @@ class InstallDocFormatterTest extends MediaWikiTestCase {
         * @covers InstallDocFormatter::format
         * @dataProvider provideDocFormattingTests
         */
-       function testFormat( $expected, $unformattedText, $message = '' ) {
+       public function testFormat( $expected, $unformattedText, $message = '' ) {
                $this->assertEquals(
                        $expected,
                        InstallDocFormatter::format( $unformattedText ),
index 592500d..66e6559 100644 (file)
@@ -13,7 +13,7 @@ class OracleInstallerTest extends MediaWikiTestCase {
         * @dataProvider provideOracleConnectStrings
         * @covers OracleInstaller::checkConnectStringFormat
         */
-       function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
+       public function testCheckConnectStringFormat( $expected, $connectString, $msg = '' ) {
                $validity = $expected ? 'should be valid' : 'should NOT be valid';
                $msg = "'$connectString' ($msg) $validity.";
                $this->assertEquals( $expected,
index 6990153..4e51c4f 100644 (file)
@@ -71,7 +71,7 @@ class JobQueueTest extends MediaWikiTestCase {
        /**
         * @dataProvider provider_queueLists
         */
-       function testProperties( $queue, $recycles, $desc ) {
+       public function testProperties( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -84,7 +84,7 @@ class JobQueueTest extends MediaWikiTestCase {
        /**
         * @dataProvider provider_queueLists
         */
-       function testBasicOperations( $queue, $recycles, $desc ) {
+       public function testBasicOperations( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -158,7 +158,7 @@ class JobQueueTest extends MediaWikiTestCase {
        /**
         * @dataProvider provider_queueLists
         */
-       function testBasicDeduplication( $queue, $recycles, $desc ) {
+       public function testBasicDeduplication( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -215,7 +215,7 @@ class JobQueueTest extends MediaWikiTestCase {
        /**
         * @dataProvider provider_queueLists
         */
-       function testRootDeduplication( $queue, $recycles, $desc ) {
+       public function testRootDeduplication( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
@@ -268,7 +268,7 @@ class JobQueueTest extends MediaWikiTestCase {
        /**
         * @dataProvider provider_fifoQueueLists
         */
-       function testJobOrder( $queue, $recycles, $desc ) {
+       public function testJobOrder( $queue, $recycles, $desc ) {
                $queue = $this->$queue;
                if ( !$queue ) {
                        $this->markTestSkipped( $desc );
index e9901ce..951dd7b 100644 (file)
@@ -21,7 +21,7 @@ class CSSMinTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideMinifyCases
         */
-       function testMinify( $code, $expectedOutput ) {
+       public function testMinify( $code, $expectedOutput ) {
                $minified = CSSMin::minify( $code );
 
                $this->assertEquals( $expectedOutput, $minified, 'Minified output should be in the form expected.' );
@@ -70,7 +70,7 @@ class CSSMinTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideRemapCases
         */
-       function testRemap( $message, $params, $expectedOutput ) {
+       public function testRemap( $message, $params, $expectedOutput ) {
                $remapped = call_user_func_array( 'CSSMin::remap', $params );
 
                $messageAdd = " Case: $message";
@@ -115,7 +115,7 @@ class CSSMinTest extends MediaWikiTestCase {
         * @group Broken
         * @dataProvider provideStringCases
         */
-       function testMinifyWithCSSStringValues( $code, $expectedOutput ) {
+       public function testMinifyWithCSSStringValues( $code, $expectedOutput ) {
                $this->testMinifyOutput( $code, $expectedOutput );
        }
 
index d04dd7d..66fe915 100644 (file)
@@ -4,7 +4,7 @@
  * Tests for IEUrlExtension::findIE6Extension
  */
 class IEUrlExtensionTest extends MediaWikiTestCase {
-       function testSimple() {
+       public function testSimple() {
                $this->assertEquals(
                        'y',
                        IEUrlExtension::findIE6Extension( 'x.y' ),
@@ -12,7 +12,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testSimpleNoExt() {
+       public function testSimpleNoExt() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( 'x' ),
@@ -20,7 +20,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testEmpty() {
+       public function testEmpty() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '' ),
@@ -28,7 +28,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testQuestionMark() {
+       public function testQuestionMark() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '?' ),
@@ -36,7 +36,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testExtQuestionMark() {
+       public function testExtQuestionMark() {
                $this->assertEquals(
                        'x',
                        IEUrlExtension::findIE6Extension( '.x?' ),
@@ -44,7 +44,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testQuestionMarkExt() {
+       public function testQuestionMarkExt() {
                $this->assertEquals(
                        'x',
                        IEUrlExtension::findIE6Extension( '?.x' ),
@@ -52,7 +52,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testInvalidChar() {
+       public function testInvalidChar() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '.x*' ),
@@ -60,7 +60,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testInvalidCharThenExtension() {
+       public function testInvalidCharThenExtension() {
                $this->assertEquals(
                        'x',
                        IEUrlExtension::findIE6Extension( '*.x' ),
@@ -68,7 +68,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testMultipleQuestionMarks() {
+       public function testMultipleQuestionMarks() {
                $this->assertEquals(
                        'c',
                        IEUrlExtension::findIE6Extension( 'a?b?.c?.d?e?f' ),
@@ -76,7 +76,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testExeException() {
+       public function testExeException() {
                $this->assertEquals(
                        'd',
                        IEUrlExtension::findIE6Extension( 'a?b?.exe?.d?.e' ),
@@ -84,7 +84,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testExeException2() {
+       public function testExeException2() {
                $this->assertEquals(
                        'exe',
                        IEUrlExtension::findIE6Extension( 'a?b?.exe' ),
@@ -92,7 +92,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testHash() {
+       public function testHash() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( 'a#b.c' ),
@@ -100,7 +100,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testHash2() {
+       public function testHash2() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( 'a?#b.c' ),
@@ -108,7 +108,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testDotAtEnd() {
+       public function testDotAtEnd() {
                $this->assertEquals(
                        '',
                        IEUrlExtension::findIE6Extension( '.' ),
@@ -116,7 +116,7 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
                );
        }
 
-       function testTwoDots() {
+       public function testTwoDots() {
                $this->assertEquals(
                        'z',
                        IEUrlExtension::findIE6Extension( 'x.y.z' ),
index eb64a64..ab72e36 100644 (file)
@@ -119,7 +119,7 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideCases
         */
-       function testJavaScriptMinifierOutput( $code, $expectedOutput ) {
+       public function testJavaScriptMinifierOutput( $code, $expectedOutput ) {
                $minified = JavaScriptMinifier::minify( $code );
 
                // JSMin+'s parser will throw an exception if output is not valid JS.
@@ -153,7 +153,7 @@ class JavaScriptMinifierTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideBug32548
         */
-       function testBug32548Exponent( $num ) {
+       public function testBug32548Exponent( $num ) {
                // Long line breaking was being incorrectly done between the base and
                // exponent part of a number, causing a syntax error. The line should
                // instead break at the start of the number.
index 68efd86..52dd2ef 100644 (file)
  */
 class CleanUpTest extends MediaWikiTestCase {
        /** @todo document */
-       function testAscii() {
+       public function testAscii() {
                $text = 'This is plain ASCII text.';
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
 
        /** @todo document */
-       function testNull() {
+       public function testNull() {
                $text = "a \x00 null";
                $expect = "a \xef\xbf\xbd null";
                $this->assertEquals(
@@ -52,13 +52,13 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testLatin() {
+       public function testLatin() {
                $text = "L'\xc3\xa9cole";
                $this->assertEquals( $text, UtfNormal::cleanUp( $text ) );
        }
 
        /** @todo document */
-       function testLatinNormal() {
+       public function testLatinNormal() {
                $text = "L'e\xcc\x81cole";
                $expect = "L'\xc3\xa9cole";
                $this->assertEquals( $expect, UtfNormal::cleanUp( $text ) );
@@ -105,7 +105,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testAllBytes() {
+       public function testAllBytes() {
                $this->doTestBytes( '', '' );
                $this->doTestBytes( 'x', '' );
                $this->doTestBytes( '', 'x' );
@@ -145,7 +145,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testDoubleBytes() {
+       public function testDoubleBytes() {
                $this->doTestDoubleBytes( '', '' );
                $this->doTestDoubleBytes( 'x', '' );
                $this->doTestDoubleBytes( '', 'x' );
@@ -198,7 +198,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testTripleBytes() {
+       public function testTripleBytes() {
                $this->doTestTripleBytes( '', '' );
                $this->doTestTripleBytes( 'x', '' );
                $this->doTestTripleBytes( '', 'x' );
@@ -276,7 +276,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testChunkRegression() {
+       public function testChunkRegression() {
                # Check for regression against a chunking bug
                $text = "\x46\x55\xb8" .
                        "\xdc\x96" .
@@ -299,7 +299,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testInterposeRegression() {
+       public function testInterposeRegression() {
                $text = "\x4e\x30" .
                        "\xb1" . # bad tail
                        "\x3a" .
@@ -334,7 +334,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testOverlongRegression() {
+       public function testOverlongRegression() {
                $text = "\x67" .
                        "\x1a" . # forbidden ascii
                        "\xea" . # bad head
@@ -359,7 +359,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testSurrogateRegression() {
+       public function testSurrogateRegression() {
                $text = "\xed\xb4\x96" . # surrogate 0xDD16
                        "\x83" . # bad tail
                        "\xb4" . # bad tail
@@ -374,7 +374,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testBomRegression() {
+       public function testBomRegression() {
                $text = "\xef\xbf\xbe" . # U+FFFE, illegal char
                        "\xb2" . # bad tail
                        "\xef" . # bad head
@@ -389,7 +389,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testForbiddenRegression() {
+       public function testForbiddenRegression() {
                $text = "\xef\xbf\xbf"; # U+FFFF, illegal char
                $expect = "\xef\xbf\xbd";
                $this->assertEquals(
@@ -398,7 +398,7 @@ class CleanUpTest extends MediaWikiTestCase {
        }
 
        /** @todo document */
-       function testHangulRegression() {
+       public function testHangulRegression() {
                $text = "\xed\x9c\xaf" . # Hangul char
                        "\xe1\x87\x81"; # followed by another final jamo
                $expect = $text; # Should *not* change.
index e90c630..43d2c9d 100644 (file)
@@ -672,7 +672,7 @@ class NewParserTest extends MediaWikiTestCase {
         *
         * @group ParserFuzz
         */
-       function testFuzzTests() {
+       public function testFuzzTests() {
                global $wgParserTestFiles;
 
                $files = $wgParserTestFiles;
index 0d2e07e..8aee937 100644 (file)
@@ -233,7 +233,7 @@ class PreprocessorTest extends MediaWikiTestCase {
         * @dataProvider provideHeadings
         * @covers Preprocessor_DOM::preprocessToXml
         */
-       function testHeadings( $wikiText, $expectedXml ) {
+       public function testHeadings( $wikiText, $expectedXml ) {
                $this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
        }
 }
index ed60079..61cbe45 100644 (file)
@@ -21,7 +21,7 @@ class TagHookTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideValidNames
         */
-       function testTagHooks( $tag ) {
+       public function testTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
@@ -36,7 +36,7 @@ class TagHookTest extends MediaWikiTestCase {
         * @dataProvider provideBadNames
         * @expectedException MWException
         */
-       function testBadTagHooks( $tag ) {
+       public function testBadTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
@@ -48,7 +48,7 @@ class TagHookTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideValidNames
         */
-       function testFunctionTagHooks( $tag ) {
+       public function testFunctionTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
@@ -63,7 +63,7 @@ class TagHookTest extends MediaWikiTestCase {
         * @dataProvider provideBadNames
         * @expectedException MWException
         */
-       function testBadFunctionTagHooks( $tag ) {
+       public function testBadFunctionTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
index 8957a2f..8706703 100644 (file)
@@ -115,7 +115,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                return true;
        }
 
-       function testFullWidth() {
+       public function testFullWidth() {
                $this->assertEquals(
                        array( 'FullOneUp', 'FullTwoLow', 'HalfOneUp', 'HalfTwoLow' ),
                        $this->fetchIds( $this->search->searchText( 'AZ' ) ),
@@ -134,14 +134,14 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        "Search for normalized from Full-width Lower" );
        }
 
-       function testTextSearch() {
+       public function testTextSearch() {
                $this->assertEquals(
                        array( 'Smithee' ),
                        $this->fetchIds( $this->search->searchText( 'smithee' ) ),
                        "Plain search failed" );
        }
 
-       function testTextPowerSearch() {
+       public function testTextPowerSearch() {
                $this->search->setNamespaces( array( 0, 1, 4 ) );
                $this->assertEquals(
                        array(
@@ -152,7 +152,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        "Power search failed" );
        }
 
-       function testTitleSearch() {
+       public function testTitleSearch() {
                $this->assertEquals(
                        array(
                                'Alan Smithee',
@@ -162,7 +162,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        "Title search failed" );
        }
 
-       function testTextTitlePowerSearch() {
+       public function testTextTitlePowerSearch() {
                $this->search->setNamespaces( array( 0, 1, 4 ) );
                $this->assertEquals(
                        array(
index e947c34..2f4fd50 100644 (file)
@@ -30,7 +30,7 @@ class SearchUpdateTest extends MediaWikiTestCase {
                return trim( SearchUpdate::updateText( $text ) );
        }
 
-       function testUpdateText() {
+       public function testUpdateText() {
                $this->assertEquals(
                        'test',
                        $this->updateText( '<div>TeSt</div>' ),
@@ -62,7 +62,7 @@ EOT
                );
        }
 
-       function testBug32712() {
+       public function testBug32712() {
                $text = "text „http://example.com“ text";
                $result = $this->updateText( $text );
                $processed = preg_replace( '/Q/u', 'Q', $result );
index 3b82e07..a806b4a 100644 (file)
@@ -51,7 +51,7 @@ class QueryAllSpecialPagesTest extends MediaWikiTestCase {
         * Test SQL for each of our QueryPages objects
         * @group Database
         */
-       function testQuerypageSqlQuery() {
+       public function testQuerypageSqlQuery() {
                global $wgDBtype;
 
                foreach ( $this->queryPages as $page ) {
index c7a4828..6c637c6 100644 (file)
@@ -15,7 +15,7 @@ class SpecialPreferencesTest extends MediaWikiTestCase {
         *
         * Test specifications by Alexandre "ialex" Emsenhuber.
         */
-       function testBug41337() {
+       public function testBug41337() {
 
                // Set a low limit
                $this->setMwGlobals( 'wgMaxSigChars', 2 );
index c737f05..17e883f 100644 (file)
@@ -18,7 +18,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
         * @param $expectedProfile An expected search profile name
         * @param $expectedNs Array Expected namespaces
         */
-       function testProfileAndNamespaceLoading(
+       public function testProfileAndNamespaceLoading(
                $requested, $userOptions, $expectedProfile, $expectedNS,
                $message = 'Profile name and namespaces mismatches!'
        ) {
@@ -112,7 +112,7 @@ class SpecialSearchTest extends MediaWikiTestCase {
         * Verify we do not expand search term in <title> on search result page
         * https://gerrit.wikimedia.org/r/4841
         */
-       function testSearchTermIsNotExpanded() {
+       public function testSearchTermIsNotExpanded() {
 
                # Initialize [[Special::Search]]
                $search = new SpecialSearch();