pass codesniffer on tests/
authorAntoine Musso <hashar@free.fr>
Mon, 28 Jan 2013 10:27:15 +0000 (11:27 +0100)
committerAntoine Musso <hashar@free.fr>
Mon, 28 Jan 2013 11:14:26 +0000 (12:14 +0100)
Fix almost all occurences of the following sniffs:

Generic.CodeAnalysis.UselessOverridingMethod.Found
Generic.Formatting.NoSpaceAfterCast.SpaceFound
Generic.Functions.FunctionCallArgumentSpacing.SpaceBeforeComma
Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine
Generic.PHP.LowerCaseConstant.Found
PSR2.Classes.PropertyDeclaration.ScopeMissing
PSR2.Files.EndFileNewline.TooMany
PSR2.Methods.MethodDeclaration.StaticBeforeVisibility

Change-Id: I96aacef5bafe5a2bca659744fba1380999cfc37d

64 files changed:
tests/phpunit/MediaWikiPHPUnitCommand.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/data/xmp/gps.result.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/DiffHistoryBlobTest.php
tests/phpunit/includes/ExternalStoreTest.php
tests/phpunit/includes/ExtraParserTest.php
tests/phpunit/includes/FormOptionsInitializationTest.php
tests/phpunit/includes/FormOptionsTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/wfGetCallerTest.php
tests/phpunit/includes/HooksTest.php
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/IPTest.php
tests/phpunit/includes/LinksUpdateTest.php
tests/phpunit/includes/LocalFileTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/RevisionStorageTest.php
tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/SampleTest.php
tests/phpunit/includes/SanitizerTest.php
tests/phpunit/includes/SeleniumConfigurationTest.php
tests/phpunit/includes/SiteConfigurationTest.php
tests/phpunit/includes/TimestampTest.php
tests/phpunit/includes/UserTest.php
tests/phpunit/includes/WikiPageTest.php
tests/phpunit/includes/WikiPageTest_ContentHandlerUseDB.php
tests/phpunit/includes/api/ApiTestCaseUpload.php
tests/phpunit/includes/api/format/ApiFormatPhpTest.php
tests/phpunit/includes/api/generateRandomImages.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/db/DatabaseSQLTest.php
tests/phpunit/includes/db/DatabaseSqliteTest.php
tests/phpunit/includes/db/DatabaseTest.php
tests/phpunit/includes/db/ORMRowTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/filerepo/StoreBatchTest.php
tests/phpunit/includes/libs/GenericArrayObjectTest.php
tests/phpunit/includes/logging/LogTests.i18n.php
tests/phpunit/includes/media/ExifRotationTest.php
tests/phpunit/includes/media/MediaHandlerTest.php
tests/phpunit/includes/media/SVGMetadataExtractorTest.php
tests/phpunit/includes/objectcache/BagOStuffTest.php
tests/phpunit/includes/parser/MagicVariableTest.php
tests/phpunit/includes/parser/MediaWikiParserTest.php
tests/phpunit/includes/parser/ParserMethodsTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/includes/site/SiteListTest.php
tests/phpunit/includes/site/SiteTest.php
tests/phpunit/includes/site/TestSites.php
tests/phpunit/includes/specials/SpecialRecentchangesTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php
tests/phpunit/languages/LanguageMlTest.php
tests/phpunit/languages/LanguageTest.php
tests/phpunit/languages/utils/CLDRPluralRuleEvaluatorTest.php
tests/phpunit/maintenance/DumpTestCase.php
tests/phpunit/maintenance/MaintenanceTest.php
tests/phpunit/maintenance/backupTextPassTest.php
tests/phpunit/maintenance/backup_LogTest.php
tests/phpunit/maintenance/backup_PageTest.php
tests/phpunit/maintenance/fetchTextTest.php
tests/phpunit/maintenance/getSlaveServerTest.php
tests/phpunit/skins/SideBarTest.php

index 3894435..0434bb3 100644 (file)
@@ -2,7 +2,7 @@
 
 class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
 
-       static $additionalOptions = array(
+       public static $additionalOptions = array(
                'regex=' => false,
                'file=' => false,
                'use-filebackend=' => false,
index cbf9a8e..19736ee 100644 (file)
@@ -71,7 +71,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                $this->backupStaticAttributes = false;
        }
 
-       function run( PHPUnit_Framework_TestResult $result = NULL ) {
+       function run( PHPUnit_Framework_TestResult $result = null ) {
                /* Some functions require some kind of caching, and will end up using the db,
                 * which we can't allow, as that would open a new connection for mysql.
                 * Replace with a HashBag. They would not be going to persist anyway.
@@ -365,7 +365,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                                'page_id' => 0,
                                'page_namespace' => 0,
                                'page_title' => ' ',
-                               'page_restrictions' => NULL,
+                               'page_restrictions' => null,
                                'page_counter' => 0,
                                'page_is_redirect' => 0,
                                'page_is_new' => 0,
@@ -513,12 +513,12 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                return $this->assertTrue( $value == '', $msg );
        }
 
-       static private function unprefixTable( $tableName ) {
+       private static function unprefixTable( $tableName ) {
                global $wgDBprefix;
                return substr( $tableName, strlen( $wgDBprefix ) );
        }
 
-       static private function isNotUnittest( $table ) {
+       private static function isNotUnittest( $table ) {
                return strpos( $table, 'unittest_' ) !== 0;
        }
 
index 2d1243d..8ea9c68 100644 (file)
@@ -9,4 +9,3 @@ $result = array( 'xmp-exif' =>
                'GPSVersionID' => '2.2.0.0'
         )
 );
-
index 29931c8..bdd4853 100644 (file)
@@ -167,7 +167,7 @@ class BlockTest extends MediaWikiLangTestCase {
                // Reload block from DB
                $userBlock = Block::newFromTarget( $username );
                $this->assertTrue(
-                       (bool) $block->prevents( 'createaccount' ),
+                       (bool)$block->prevents( 'createaccount' ),
                        "Block object in DB should prevents 'createaccount'"
                );
 
@@ -180,7 +180,7 @@ class BlockTest extends MediaWikiLangTestCase {
                // Reload user
                $u = User::newFromName( $username );
                $this->assertTrue(
-                       (bool) $u->isBlockedFromCreateAccount(),
+                       (bool)$u->isBlockedFromCreateAccount(),
                        "Our sandbox user '$username' should NOT be able to create account"
                );
        }
@@ -223,7 +223,7 @@ class BlockTest extends MediaWikiLangTestCase {
 
                $block = Block::newFromID( $res['id'] );
                $this->assertEquals( 'UserOnForeignWiki', $block->getTarget()->getName(), 'Correct blockee name' );
-               $this->assertEquals( '14146',  $block->getTarget()->getId(), 'Correct blockee id' );
+               $this->assertEquals( '14146', $block->getTarget()->getId(), 'Correct blockee id' );
                $this->assertEquals( 'MetaWikiUser', $block->getBlocker(), 'Correct blocker name' );
                $this->assertEquals( 'MetaWikiUser', $block->getByName(), 'Correct blocker name' );
                $this->assertEquals( 0, $block->getBy(), 'Correct blocker id' );
index 361b412..dcd9ddd 100644 (file)
@@ -22,7 +22,7 @@ class DiffHistoryBlobTest extends MediaWikiTestCase {
         * @dataProvider provideXdiffAdler32
         */
        function testXdiffAdler32( $input ) {
-               $xdiffHash = substr( xdiff_string_rabdiff( $input, '' ),  0, 4 );
+               $xdiffHash = substr( xdiff_string_rabdiff( $input, '' ), 0, 4 );
                $dhb = new DiffHistoryBlob;
                $myHash = $dhb->xdiffAdler32( $input );
                $this->assertSame( bin2hex( $xdiffHash ), bin2hex( $myHash ),
index fe6c60d..99544e7 100644 (file)
@@ -78,4 +78,4 @@ class ExternalStoreFOO {
 
                return $this->data[$cluster][$id];
        }
-}
\ No newline at end of file
+}
index ca1615e..46aa6fc 100644 (file)
@@ -40,7 +40,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        /* Test the parser entry points */
        function testParse() {
                $title = Title::newFromText( __FUNCTION__ );
-               $parserOutput = $this->parser->parse( "Test\n{{Foo}}\n{{Bar}}" , $title, $this->options );
+               $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() );
        }
        
@@ -54,7 +54,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        
        function testPreprocess() {
                $title = Title::newFromText( __FUNCTION__ );
-               $outputText = $this->parser->preprocess( "Test\n{{Foo}}\n{{Bar}}" , $title, $this->options );
+               $outputText = $this->parser->preprocess( "Test\n{{Foo}}\n{{Bar}}", $title, $this->options );
                
                $this->assertEquals( "Test\nContent of ''Template:Foo''\nContent of ''Template:Bar''", $outputText );
        }
@@ -140,7 +140,7 @@ class ExtraParserTest extends MediaWikiTestCase {
                $catName =  wfMessage( 'broken-file-category' )->inContentLanguage()->text();
                $cat = Title::makeTitleSafe( NS_CATEGORY, $catName );
                $expected = array( $cat->getDBkey() );
-               $parserOutput = $this->parser->parse( "[[file:nonexistent]]" , $title, $this->options );
+               $parserOutput = $this->parser->parse( "[[file:nonexistent]]", $title, $this->options );
                $result = $parserOutput->getCategoryLinks();
                $this->assertEquals( $expected, $result );
        }
@@ -151,7 +151,7 @@ class ExtraParserTest extends MediaWikiTestCase {
        function testTrackingCategorySpecial() {
                // Special pages shouldn't have tracking cats.
                $title = SpecialPage::getTitleFor( 'Contributions' );
-               $parserOutput = $this->parser->parse( "[[file:nonexistent]]" , $title, $this->options );
+               $parserOutput = $this->parser->parse( "[[file:nonexistent]]", $title, $this->options );
                $result = $parserOutput->getCategoryLinks();
                $this->assertEmpty( $result );
        }
index af28f79..99f8fb7 100644 (file)
@@ -61,12 +61,12 @@ class FormOptionsInitializationTest extends MediaWikiTestCase {
        }
 
        public function testAddIntegers() {
-               $this->object->add( 'one',     1 ); 
-               $this->object->add( 'negone', -1 ); 
+               $this->object->add( 'one', 1 );
+               $this->object->add( 'negone', -1 );
                $this->assertEquals(
                        array(
                                'negone' => array(
-                                       'default'  => -1, 
+                                       'default'  => -1,
                                        'value' => null,
                                        'consumed' => false,
                                        'type'   => FormOptions::INT,
index d4e3c5e..bdc5f12 100644 (file)
@@ -33,8 +33,8 @@ class FormOptionsTest extends MediaWikiTestCase {
                $this->object = new FormOptions;
                $this->object->add( 'string1', 'string one' );
                $this->object->add( 'string2', 'string two' );
-               $this->object->add( 'integer',  0 );
-               $this->object->add( 'intnull',  0, FormOptions::INTNULL );
+               $this->object->add( 'integer', 0 );
+               $this->object->add( 'intnull', 0, FormOptions::INTNULL );
        }
 
        /** Helpers for testGuessType() */
index 1a02cb8..162970f 100644 (file)
@@ -686,4 +686,3 @@ class GlobalTest extends MediaWikiTestCase {
        }
        /* TODO: many more! */
 }
-
index 4c4c4c0..15f3507 100644 (file)
@@ -32,4 +32,3 @@ class wfGetCaller extends MediaWikiTestCase {
                        $this->assertEquals( "wfGetCaller::intermediateFunction", self::intermediateFunction( $i + 1, $i ) );
        }
 }
-
index e455f0f..89e789b 100644 (file)
@@ -111,7 +111,7 @@ class HooksTest extends MediaWikiTestCase {
 class NothingClass {
        public $calls = 0;
 
-       static public function someStatic( &$foo, &$bar ) {
+       public static function someStatic( &$foo, &$bar ) {
                $foo = 'bah';
                return true;
        }
index b49de65..92a1c9c 100644 (file)
@@ -54,7 +54,7 @@ class HttpTest extends MediaWikiTestCase {
        function testIsValidUri( $expect, $URI, $message = '' ) {
                $this->assertEquals(
                        $expect,
-                       (bool) Http::isValidURI( $URI ),
+                       (bool)Http::isValidURI( $URI ),
                        $message
                );
        }
index c4a6c55..5284812 100644 (file)
@@ -119,7 +119,7 @@ class IPTest extends MediaWikiTestCase {
                        $c = sprintf( "%01d", $i );
                        foreach ( array_unique( array( $a, $b, $c ) ) as $f ) {
                                $ip = "$f.$f.$f.$f";
-                               $this->assertTrue( IP::isValid( $ip ) , "$ip is a valid IPv4 address" );
+                               $this->assertTrue( IP::isValid( $ip ), "$ip is a valid IPv4 address" );
                        }
                }
                foreach ( range( 0x0, 0xFFFF, 0xF ) as $i ) {
@@ -128,7 +128,7 @@ class IPTest extends MediaWikiTestCase {
                        $c = sprintf( "%02x", $i );
                        foreach ( array_unique( array( $a, $b, $c ) ) as $f ) {
                                $ip = "$f:$f:$f:$f:$f:$f:$f:$f";
-                               $this->assertTrue( IP::isValid( $ip ) , "$ip is a valid IPv6 address" );
+                               $this->assertTrue( IP::isValid( $ip ), "$ip is a valid IPv6 address" );
                        }
                }
                // test with some abbreviations
@@ -173,7 +173,7 @@ class IPTest extends MediaWikiTestCase {
                        $c = sprintf( "%02s", $i );
                        foreach ( array_unique( array( $a, $b, $c ) ) as $f ) {
                                $ip = "$f:$f:$f:$f:$f:$f:$f:$f";
-                               $this->assertFalse( IP::isValid( $ip ) , "$ip is not a valid IPv6 address" );
+                               $this->assertFalse( IP::isValid( $ip ), "$ip is not a valid IPv6 address" );
                        }
                }
                // Have CIDR
@@ -264,7 +264,7 @@ class IPTest extends MediaWikiTestCase {
         */
        public function testip2longWrapper() {
                // @todo FIXME: Add more tests ?
-               $this->assertEquals( pow(2,32) - 1, IP::toUnsigned( '255.255.255.255' ));
+               $this->assertEquals( pow(2,32) - 1, IP::toUnsigned( '255.255.255.255' ) );
                $i = 'IN.VA.LI.D';
                $this->assertFalse( IP::toUnSigned( $i ) );
        }
index 3325885..244e4a8 100644 (file)
@@ -160,4 +160,3 @@ class LinksUpdateTest extends MediaWikiTestCase {
                $this->assertSelect( $table, $fields, $condition, $expectedRows );
        }
 }
-
index c5a9dc1..7b64a33 100644 (file)
@@ -105,5 +105,3 @@ class LocalFileTest extends MediaWikiTestCase {
                $this->assertThat( $file, $this->isInstanceOf( 'LocalFile' ), 'wfLocalFile() returns LocalFile for valid Titles' );
        }
 }
-
-
index 01d406a..d0b3814 100644 (file)
@@ -570,4 +570,3 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $this->assertFalse( MWNamespace::subjectEquals( $ns1, $ns2, $msg ) );
        }
 }
-
index 4fa42f3..1301bf3 100644 (file)
@@ -127,8 +127,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::__construct
         */
-       public function testConstructFromRow()
-       {
+       public function testConstructFromRow() {
                $orig = $this->makeRevision();
 
                $dbr = wfgetDB( DB_SLAVE );
@@ -146,8 +145,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::newFromRow
         */
-       public function testNewFromRow()
-       {
+       public function testNewFromRow() {
                $orig = $this->makeRevision();
 
                $dbr = wfgetDB( DB_SLAVE );
@@ -166,8 +164,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::newFromArchiveRow
         */
-       public function testNewFromArchiveRow()
-       {
+       public function testNewFromArchiveRow() {
                $page = $this->createPage( 'RevisionStorageTest_testNewFromArchiveRow', 'Lorem Ipsum', CONTENT_MODEL_WIKITEXT );
                $orig = $page->getRevision();
                $page->doDeleteArticle( 'test Revision::newFromArchiveRow' );
@@ -187,8 +184,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::newFromId
         */
-       public function testNewFromId()
-       {
+       public function testNewFromId() {
                $orig = $this->makeRevision();
 
                $rev = Revision::newFromId( $orig->getId() );
@@ -199,8 +195,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::fetchRevision
         */
-       public function testFetchRevision()
-       {
+       public function testFetchRevision() {
                $page = $this->createPage( 'RevisionStorageTest_testFetchRevision', 'one', CONTENT_MODEL_WIKITEXT );
                $id1 = $page->getRevision()->getId();
 
@@ -223,8 +218,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::selectFields
         */
-       public function testSelectFields()
-       {
+       public function testSelectFields() {
                global $wgContentHandlerUseDB;
 
                $fields = Revision::selectFields();
@@ -245,8 +239,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getPage
         */
-       public function testGetPage()
-       {
+       public function testGetPage() {
                $page = $this->the_page;
 
                $orig = $this->makeRevision( array( 'page' => $page->getId() ) );
@@ -258,8 +251,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getText
         */
-       public function testGetText()
-       {
+       public function testGetText() {
                $this->hideDeprecated( 'Revision::getText' );
 
                $orig = $this->makeRevision( array( 'text' => 'hello hello.' ) );
@@ -271,8 +263,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getContent
         */
-       public function testGetContent_failure()
-       {
+       public function testGetContent_failure() {
                $rev = new Revision( array(
                        'page'       =>  $this->the_page->getId(),
                        'content_model' => $this->the_page->getContentModel(),
@@ -290,8 +281,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getContent
         */
-       public function testGetContent()
-       {
+       public function testGetContent() {
                $orig = $this->makeRevision( array( 'text' => 'hello hello.' ) );
                $rev = Revision::newFromId( $orig->getId() );
 
@@ -301,8 +291,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::revText
         */
-       public function testRevText()
-       {
+       public function testRevText() {
                $this->hideDeprecated( 'Revision::revText' );
                $orig = $this->makeRevision( array( 'text' => 'hello hello rev.' ) );
                $rev = Revision::newFromId( $orig->getId() );
@@ -313,8 +302,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getRawText
         */
-       public function testGetRawText()
-       {
+       public function testGetRawText() {
                $this->hideDeprecated( 'Revision::getRawText' );
 
                $orig = $this->makeRevision( array( 'text' => 'hello hello raw.' ) );
@@ -326,8 +314,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getContentModel
         */
-       public function testGetContentModel()
-       {
+       public function testGetContentModel() {
                global $wgContentHandlerUseDB;
 
                if ( !$wgContentHandlerUseDB ) {
@@ -344,8 +331,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getContentFormat
         */
-       public function testGetContentFormat()
-       {
+       public function testGetContentFormat() {
                global $wgContentHandlerUseDB;
 
                if ( !$wgContentHandlerUseDB ) {
@@ -363,8 +349,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::isCurrent
         */
-       public function testIsCurrent()
-       {
+       public function testIsCurrent() {
                $page = $this->createPage( 'RevisionStorageTest_testIsCurrent', 'Lorem Ipsum', CONTENT_MODEL_WIKITEXT );
                $rev1 = $page->getRevision();
 
@@ -390,8 +375,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getPrevious
         */
-       public function testGetPrevious()
-       {
+       public function testGetPrevious() {
                $page = $this->createPage( 'RevisionStorageTest_testGetPrevious', 'Lorem Ipsum testGetPrevious', CONTENT_MODEL_WIKITEXT );
                $rev1 = $page->getRevision();
 
@@ -408,8 +392,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::getNext
         */
-       public function testGetNext()
-       {
+       public function testGetNext() {
                $page = $this->createPage( 'RevisionStorageTest_testGetNext', 'Lorem Ipsum testGetNext', CONTENT_MODEL_WIKITEXT );
                $rev1 = $page->getRevision();
 
@@ -426,8 +409,7 @@ class RevisionStorageTest extends MediaWikiTestCase {
        /**
         * @covers Revision::newNullRevision
         */
-       public function testNewNullRevision()
-       {
+       public function testNewNullRevision() {
                $page = $this->createPage( 'RevisionStorageTest_testNewNullRevision', 'some testing text', CONTENT_MODEL_WIKITEXT );
                $orig = $page->getRevision();
 
index 9cddbe8..33761d2 100644 (file)
@@ -313,8 +313,7 @@ class RevisionTest extends MediaWikiTestCase {
         * @group Database
         * @dataProvider dataGetSize
         */
-       public function testGetSize( $text, $model, $expected_size )
-       {
+       public function testGetSize( $text, $model, $expected_size ) {
                $rev = $this->newTestRevision( $text, 'RevisionTest_testGetSize', $model );
                $this->assertEquals( $expected_size, $rev->getSize() );
        }
@@ -331,8 +330,7 @@ class RevisionTest extends MediaWikiTestCase {
         * @group Database
         * @dataProvider dataGetSha1
         */
-       public function testGetSha1( $text, $model, $expected_hash )
-       {
+       public function testGetSha1( $text, $model, $expected_hash ) {
                $rev = $this->newTestRevision( $text, 'RevisionTest_testGetSha1', $model );
                $this->assertEquals( $expected_hash, $rev->getSha1() );
        }
index 88bbc07..1439e44 100644 (file)
@@ -103,4 +103,3 @@ class TestSample extends MediaWikiLangTestCase {
                $this->assertEquals( "Test", $title->isLocal() );
        }
 }
-
index 28e2e30..2d039d9 100644 (file)
@@ -226,4 +226,3 @@ class SanitizerTest extends MediaWikiTestCase {
                );
        }
 }
-
index 8f6aafa..3989fad 100644 (file)
@@ -161,7 +161,7 @@ testBrowser                 = "firefox"
                SeleniumConfig::getSeleniumSettings($seleniumSettings,
                        $seleniumBrowsers,
                        $seleniumTestSuites);
-               $this->assertEquals($seleniumSettings, $this->testSettings0 ,
+               $this->assertEquals($seleniumSettings, $this->testSettings0,
                'The selenium settings should have been read from the file defined in $wgSeleniumConfigFile'
                );
                $this->assertEquals($seleniumBrowsers, $this->testBrowsers0,
@@ -207,7 +207,7 @@ testBrowser                 = "firefox"
        private function writeToTempFile($textToWrite) {
                $this->tempFileName = tempnam(sys_get_temp_dir(), 'test_settings.');
                $tempFile =      fopen( $this->tempFileName, "w" );
-               fwrite($tempFile , $textToWrite);
+               fwrite($tempFile, $textToWrite);
                fclose($tempFile);
        }
 
index 27c0bb5..fc7d8d0 100644 (file)
@@ -306,7 +306,7 @@ class SiteConfigurationTest extends MediaWikiTestCase {
                $this->assertEquals( $getall['simple'], $GLOBALS['simple'], 'extractAllGlobals(): simple setting' );
                $this->assertEquals( $getall['fallback'], $GLOBALS['fallback'], 'extractAllGlobals(): fallback setting' );
                $this->assertEquals( $getall['params'], $GLOBALS['params'], 'extractAllGlobals(): parameter replacement' );
-               $this->assertEquals( $getall['global'], $GLOBALS['global'],  'extractAllGlobals(): merging with global' );
-               $this->assertEquals( $getall['merge'], $GLOBALS['merge'],  'extractAllGlobals(): merging setting' );
+               $this->assertEquals( $getall['global'], $GLOBALS['global'], 'extractAllGlobals(): merging with global' );
+               $this->assertEquals( $getall['merge'], $GLOBALS['merge'], 'extractAllGlobals(): merging setting' );
        }
 }
index d7da0db..de2f855 100644 (file)
@@ -29,7 +29,7 @@ class TimestampTest extends MediaWikiTestCase {
         */
        function testValidOutput( $format, $expected, $original ) {
                $timestamp = new MWTimestamp( $original );
-               $this->assertEquals( $expected, (string) $timestamp->getTimestamp( $format ) );
+               $this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
        }
 
        /**
index e5a014d..a9dfca1 100644 (file)
@@ -175,7 +175,7 @@ class UserTest extends MediaWikiTestCase {
                // let the user have a few (3) edits
                $page = WikiPage::factory( Title::newFromText( 'Help:UserTest_EditCount' ) );
                for( $i = 0; $i < 3; $i++ ) {
-                       $page->doEdit( (string) $i, 'test', 0, false, $user );
+                       $page->doEdit( (string)$i, 'test', 0, false, $user );
                }
 
                $user->clearInstanceCache();
index 9f281bd..458bea4 100644 (file)
@@ -108,19 +108,19 @@ abstract class ApiTestCaseUpload extends ApiTestCase {
 
        }
 
-       function fakeUploadChunk(  $fieldName, $fileName, $type, & $chunkData ){
+       function fakeUploadChunk(  $fieldName, $fileName, $type, & $chunkData ) {
                $tmpName = tempnam( wfTempDir(), "" );
-               // copy the chunk data to temp location: 
+               // copy the chunk data to temp location:
                if ( !file_put_contents( $tmpName, $chunkData ) ) {
                        throw new Exception( "couldn't copy chunk data to $tmpName" );
                }
-               
+
                clearstatcache();
                $size = filesize( $tmpName );
                if ( $size === false ) {
                        throw new Exception( "couldn't stat $tmpName" );
                }
-               
+
                $_FILES[ $fieldName ] = array(
                        'name'          => $fileName,
                        'type'          => $type,
index d34e799..a59983d 100644 (file)
@@ -8,13 +8,12 @@
 class ApiFormatPhpTest extends ApiFormatTestBase {
 
        function testValidPhpSyntax() {
-               
+
                $data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
-               
+
                $this->assertInternalType( 'array', unserialize( $data ) );
-               $this->assertGreaterThan( 0, count( (array) $data ) );
-               
-               
+               $this->assertGreaterThan( 0, count( (array)$data ) );
+
        }
 
 }
index ee34562..a054283 100644 (file)
@@ -47,5 +47,3 @@ class GenerateRandomImages extends Maintenance {
 
 $maintClass = 'GenerateRandomImages';
 require( RUN_MAINTENANCE_IF_MAIN );
-
-
index 73d0012..e12c8c7 100644 (file)
@@ -103,7 +103,7 @@ class ContentHandlerTest extends MediaWikiTestCase {
 
                if ( $expected ) {
                        $this->assertNotNull( $name, "no name found for content model $id" );
-                       $this->assertTrue( preg_match( $expected, $name ) > 0 ,
+                       $this->assertTrue( preg_match( $expected, $name ) > 0,
                                "content model name for #$id did not match pattern $expected"
                        );
                } else {
@@ -361,8 +361,7 @@ class DummyContentForTesting extends AbstractContent {
         * @return mixed the native representation of the content. Could be a string, a nested array
         *  structure, an object, a binary blob... anything, really.
         */
-       public function getNativeData()
-       {
+       public function getNativeData() {
                return $this->data;
        }
 
@@ -415,7 +414,7 @@ class DummyContentForTesting extends AbstractContent {
         *
         * @return ParserOutput
         */
-       public function getParserOutput( Title $title, $revId = null, ParserOptions $options = NULL, $generateHtml = true ) {
+       public function getParserOutput( Title $title, $revId = null, ParserOptions $options = null, $generateHtml = true ) {
                return new ParserOutput( $this->getNativeData() );
        }
 }
index 51127f8..9a62abc 100644 (file)
@@ -145,4 +145,4 @@ class DatabaseSQLTest extends MediaWikiTestCase {
                        ),
                );
        }
-}
\ No newline at end of file
+}
index a391fc5..db369fc 100644 (file)
@@ -12,7 +12,10 @@ class MockDatabaseSqlite extends DatabaseSqliteStandalone {
                return true;
        }
 
-       function replaceVars( $s ) {
+       /**
+        * Override parent visibility to public
+        */
+       public function replaceVars( $s ) {
                return parent::replaceVars( $s );
        }
 }
index cbbdc1f..8c992c7 100644 (file)
@@ -210,5 +210,3 @@ class DatabaseTest extends MediaWikiTestCase {
                );
        }
 }
-
-
index 8516241..596d0bd 100644 (file)
@@ -43,19 +43,19 @@ abstract class ORMRowTest extends \MediaWikiTestCase {
         * @since 1.20
         * @return string
         */
-       protected abstract function getRowClass();
+       abstract protected function getRowClass();
 
        /**
         * @since 1.20
         * @return IORMTable
         */
-       protected abstract function getTableInstance();
+       abstract protected function getTableInstance();
 
        /**
         * @since 1.20
         * @return array
         */
-       public abstract function constructorTestProvider();
+       abstract public function constructorTestProvider();
 
        /**
         * @since 1.20
@@ -222,4 +222,4 @@ abstract class ORMRowTest extends \MediaWikiTestCase {
 
        // TODO: test all of the methods!
 
-}
\ No newline at end of file
+}
index 0cb8105..b0e07f2 100644 (file)
@@ -799,7 +799,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        $status = $this->prepare( array( 'dir' => dirname( $path ) ) );
                        $this->assertGoodStatus( $status,
                                "Preparing $path succeeded without warnings ($backendName)." );
-                       $ops[] = array( 'op' => 'create', 'dst' => $path, 'content' => mt_rand(0,50000) );
+                       $ops[] = array( 'op' => 'create', 'dst' => $path, 'content' => mt_rand(0, 50000) );
                        $purgeOps[] = array( 'op' => 'delete', 'src' => $path );
                }
                $purgeOps[] = array( 'op' => 'null' );
index 7d815e9..5f01c70 100644 (file)
@@ -84,7 +84,7 @@ class StoreBatchTest extends MediaWikiTestCase {
                $f = $this->storeit( $fn, $infn, 0 );
                $this->assertTrue( $f->isOK(), 'failed to store a new file' );
                $this->assertEquals( $f->failCount, 0, "counts wrong {$f->successCount} {$f->failCount}" );
-               $this->assertEquals( $f->successCount, 1 , "counts wrong {$f->successCount} {$f->failCount}" );
+               $this->assertEquals( $f->successCount, 1, "counts wrong {$f->successCount} {$f->failCount}" );
                if ( $fromrepo ) {
                        $f = $this->storeit( "Other-$fn", $infn, FileRepo::OVERWRITE);
                        $infn = $f->value;
@@ -93,17 +93,17 @@ class StoreBatchTest extends MediaWikiTestCase {
                $f = $this->storeit( $fn, $infn, FileRepo::OVERWRITE );
                $this->assertTrue( $f->isOK(), 'We should be allowed to overwrite' );
                $this->assertEquals( $f->failCount, 0, "counts wrong {$f->successCount} {$f->failCount}" );
-               $this->assertEquals( $f->successCount, 1 , "counts wrong {$f->successCount} {$f->failCount}" );
+               $this->assertEquals( $f->successCount, 1, "counts wrong {$f->successCount} {$f->failCount}" );
                // This should fail because we're overwriting.
                $f = $this->storeit( $fn, $infn, 0 );
                $this->assertFalse( $f->isOK(), 'We should not be allowed to overwrite' );
                $this->assertEquals( $f->failCount, 1, "counts wrong {$f->successCount} {$f->failCount}" );
-               $this->assertEquals( $f->successCount, 0 , "counts wrong {$f->successCount} {$f->failCount}" );
+               $this->assertEquals( $f->successCount, 0, "counts wrong {$f->successCount} {$f->failCount}" );
                // This should succeed because we're overwriting the same content.
                $f = $this->storeit( $fn, $infn, FileRepo::OVERWRITE_SAME );
                $this->assertTrue( $f->isOK(), 'We should be able to overwrite the same content' );
                $this->assertEquals( $f->failCount, 0, "counts wrong {$f->successCount} {$f->failCount}" );
-               $this->assertEquals( $f->successCount, 1 , "counts wrong {$f->successCount} {$f->failCount}" );
+               $this->assertEquals( $f->successCount, 1, "counts wrong {$f->successCount} {$f->failCount}" );
                // This should fail because we're overwriting different content.
                if ( $fromrepo ) {
                        $f = $this->storeit( "Other-$fn", $otherfn, FileRepo::OVERWRITE);
@@ -112,7 +112,7 @@ class StoreBatchTest extends MediaWikiTestCase {
                $f = $this->storeit( $fn, $otherfn, FileRepo::OVERWRITE_SAME );
                $this->assertFalse( $f->isOK(), 'We should not be allowed to overwrite different content' );
                $this->assertEquals( $f->failCount, 1, "counts wrong {$f->successCount} {$f->failCount}" );
-               $this->assertEquals( $f->successCount, 0 , "counts wrong {$f->successCount} {$f->failCount}" );
+               $this->assertEquals( $f->successCount, 0, "counts wrong {$f->successCount} {$f->failCount}" );
        }
 
        public function teststore() {
index c0f8a96..3bbf3aa 100644 (file)
@@ -36,7 +36,7 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         *
         * @return array
         */
-       public abstract function elementInstancesProvider();
+       abstract public function elementInstancesProvider();
 
        /**
         * Returns the name of the concrete class being tested.
@@ -45,7 +45,7 @@ abstract class GenericArrayObjectTest extends MediaWikiTestCase {
         *
         * @return string
         */
-       public abstract function getInstanceClass();
+       abstract public function getInstanceClass();
 
        /**
         * Provides instances of the concrete class being tested.
index 8a0a421..c074696 100755 (executable)
@@ -12,4 +12,4 @@ $messages['en'] = array(
        'log-description-phpunit' => 'Log for PHPUnit-tests',
        'logentry-phpunit-test'   => '$1 {{GENDER:$2|tests}} with page $3',
        'logentry-phpunit-param'  => '$4',
-);
\ No newline at end of file
+);
index d52fecc..88b2a83 100644 (file)
@@ -222,41 +222,40 @@ class ExifRotationTest extends MediaWikiTestCase {
                        )
                );
        }
-       
-       
+
+
        const TEST_WIDTH = 100;
        const TEST_HEIGHT = 200;
-       
+
        /**
         * @dataProvider provideBitmapExtractPreRotationDimensions
         */
        function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
                $result = $this->handler->extractPreRotationDimensions( array(
-                               'physicalWidth' => self::TEST_WIDTH, 
+                               'physicalWidth' => self::TEST_WIDTH,
                                'physicalHeight' => self::TEST_HEIGHT,
                        ), $rotation );
                $this->assertEquals( $expected, $result );
        }
-       
+
        function provideBitmapExtractPreRotationDimensions() {
                return array(
                        array(
                                0,
-                               array( self::TEST_WIDTH, self::TEST_HEIGHT ) 
+                               array( self::TEST_WIDTH, self::TEST_HEIGHT )
                        ),
                        array(
                                90,
-                               array( self::TEST_HEIGHT, self::TEST_WIDTH ) 
+                               array( self::TEST_HEIGHT, self::TEST_WIDTH )
                        ),
                        array(
                                180,
-                               array( self::TEST_WIDTH, self::TEST_HEIGHT ) 
+                               array( self::TEST_WIDTH, self::TEST_HEIGHT )
                        ),
                        array(
                                270,
-                               array( self::TEST_HEIGHT, self::TEST_WIDTH ) 
+                               array( self::TEST_HEIGHT, self::TEST_WIDTH )
                        ),
                );
        }
 }
-
index 99df4f8..4e4c649 100644 (file)
@@ -46,5 +46,3 @@ class MediaHandlerTest extends MediaWikiTestCase {
                }
        }
 }
-
-
index d9a59ca..f131972 100644 (file)
@@ -106,4 +106,3 @@ class SVGMetadataExtractorTest extends MediaWikiTestCase {
                );
        }
 }
-
index ab3d811..f5264be 100644 (file)
@@ -68,7 +68,7 @@ class BagOStuffTest extends MediaWikiTestCase {
                 * - pcntl_fork is supported by the system
                 * - cache type will correctly support calls over forks
                 */
-               $fork = (bool) $this->getCliArg( 'use-bagostuff=' );
+               $fork = (bool)$this->getCliArg( 'use-bagostuff=' );
                $fork &= function_exists( 'pcntl_fork' );
                $fork &= !$this->cache instanceof HashBagOStuff;
                $fork &= !$this->cache instanceof EmptyBagOStuff;
index 5f670fc..c82ae9b 100644 (file)
@@ -189,7 +189,7 @@ class MagicVariableTest extends MediaWikiTestCase {
         */
        private function assertMagic( $expected, $magic ) {
                if( in_array( $magic, $this->expectedAsInteger ) ) {
-                       $expected = (int) $expected;
+                       $expected = (int)$expected;
                }
 
                # Generate a message for the assertion
index b15365c..013b02c 100644 (file)
@@ -22,7 +22,7 @@ class MediaWikiParserTest {
                         * and then was ucfirst( basename( $filename, '.txt' )
                         * but that didn't work with names like foo.tests.txt
                         */
-                       $className = str_replace( '.', '_',  ucfirst( $testsName ) );
+                       $className = str_replace( '.', '_', ucfirst( $testsName ) );
 
                        eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = '" . strtr( $filename, array( "'" => "\\'", '\\' => '\\\\' ) ) . "'; } " );
 
index e0f95b6..f3a12d0 100644 (file)
@@ -30,4 +30,3 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
 
        // TODO: Add tests for cleanSig() / cleanSigInSig(), getSection(), replaceSection(), getPreloadText()
 }
-
index 8b83b67..c3a251f 100644 (file)
@@ -226,4 +226,3 @@ class PreprocessorTest extends MediaWikiTestCase {
                $this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
        }
 }
-
index 7b88212..0307d4d 100644 (file)
@@ -188,4 +188,4 @@ class SiteListTest extends MediaWikiTestCase {
                }
        }
 
-}
\ No newline at end of file
+}
index 255e2de..c11165b 100644 (file)
@@ -265,4 +265,4 @@ class SiteTest extends MediaWikiTestCase {
                $this->assertEquals( $serialization, serialize( $newInstance ) );
        }
 
-}
\ No newline at end of file
+}
index b57fe9f..a5656a7 100644 (file)
@@ -98,4 +98,4 @@ class TestSites {
                $sitesTable->saveSites( TestSites::getSites() );
        }
 
-}
\ No newline at end of file
+}
index b7f6182..10ff664 100644 (file)
@@ -11,7 +11,7 @@ class LanguageMlTest extends LanguageClassesTestCase {
        /** see bug 29495 */
        /** @dataProvider providerFormatNum*/
        function testFormatNum( $result, $value ) {
-               $this->assertEquals( $result,  $this->getLang()->formatNum( $value ) );
+               $this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
        }
 
        function providerFormatNum() {
index 5594670..a6d3677 100644 (file)
@@ -425,14 +425,14 @@ class LanguageTest extends LanguageClassesTestCase {
         */
        function testBuiltInCodeValidation( $code, $message = '' ) {
                $this->assertTrue(
-                       (bool) Language::isValidBuiltInCode( $code ),
+                       (bool)Language::isValidBuiltInCode( $code ),
                        "validating code $code $message"
                );
        }
 
        function testBuiltInCodeValidationRejectUnderscore() {
                $this->assertFalse(
-                       (bool) Language::isValidBuiltInCode( 'be_tarask' ),
+                       (bool)Language::isValidBuiltInCode( 'be_tarask' ),
                        "reject underscore in language code"
                );
        }
@@ -1284,4 +1284,3 @@ class LanguageTest extends LanguageClassesTestCase {
                );
        }
 }
-
index 033164b..58fcf16 100644 (file)
@@ -9,7 +9,7 @@ class CLDRPluralRuleEvaluatorTest extends MediaWikiTestCase {
         * @dataProvider validTestCases
         */
        function testValidRules( $expected, $rules, $number, $comment ) {
-               $result = CLDRPluralRuleEvaluator::evaluate( $number, (array) $rules );
+               $result = CLDRPluralRuleEvaluator::evaluate( $number, (array)$rules );
                $this->assertEquals( $expected, $result, $comment );
        }
 
@@ -18,7 +18,7 @@ class CLDRPluralRuleEvaluatorTest extends MediaWikiTestCase {
         * @expectedException CLDRPluralRuleError
         */
        function testInvalidRules( $rules, $comment ) {
-               CLDRPluralRuleEvaluator::evaluate( 1, (array) $rules );
+               CLDRPluralRuleEvaluator::evaluate( 1, (array)$rules );
        }
 
        function validTestCases() {
index 0f3a6a1..106fab8 100644 (file)
@@ -57,7 +57,7 @@ abstract class DumpTestCase extends MediaWikiLangTestCase {
         */
        protected function gunzip( $fname ) {
                $gzipped_contents = file_get_contents( $fname );
-               if ( $gzipped_contents === FALSE ) {
+               if ( $gzipped_contents === false ) {
                        $this->fail( "Could not get contents of $fname" );
                }
                // We resort to use gzinflate instead of gzdecode, as gzdecode
index a0ed745..b9c0fb8 100644 (file)
@@ -191,44 +191,44 @@ class MaintenanceTest extends MediaWikiTestCase {
 
        function testOutputEmpty() {
                $this->m->output( "" );
-               $this->assertOutputPrePostShutdown( "", False );
+               $this->assertOutputPrePostShutdown( "", false );
        }
 
        function testOutputString() {
                $this->m->output( "foo" );
-               $this->assertOutputPrePostShutdown( "foo", False );
+               $this->assertOutputPrePostShutdown( "foo", false );
        }
 
        function testOutputStringString() {
                $this->m->output( "foo" );
                $this->m->output( "bar" );
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testOutputStringNL() {
                $this->m->output( "foo\n" );
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testOutputStringNLNL() {
                $this->m->output( "foo\n\n" );
-               $this->assertOutputPrePostShutdown( "foo\n\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n\n", false );
        }
 
        function testOutputStringNLString() {
                $this->m->output( "foo\nbar" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar", false );
        }
 
        function testOutputStringNLStringNL() {
                $this->m->output( "foo\nbar\n" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputStringNLStringNLLinewise() {
                $this->m->output( "foo\n" );
                $this->m->output( "bar\n" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputStringNLStringNLArbitrary() {
@@ -239,7 +239,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "ba" );
                $this->m->output( "" );
                $this->m->output( "r\n" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputStringNLStringNLArbitraryAgain() {
@@ -250,49 +250,49 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "a" );
                $this->m->output( "" );
                $this->m->output( "r\n" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputWNullChannelEmpty() {
                $this->m->output( "", null );
-               $this->assertOutputPrePostShutdown( "", False );
+               $this->assertOutputPrePostShutdown( "", false );
        }
 
        function testOutputWNullChannelString() {
                $this->m->output( "foo", null );
-               $this->assertOutputPrePostShutdown( "foo", False );
+               $this->assertOutputPrePostShutdown( "foo", false );
        }
 
        function testOutputWNullChannelStringString() {
                $this->m->output( "foo", null );
                $this->m->output( "bar", null );
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testOutputWNullChannelStringNL() {
                $this->m->output( "foo\n", null );
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testOutputWNullChannelStringNLNL() {
                $this->m->output( "foo\n\n", null );
-               $this->assertOutputPrePostShutdown( "foo\n\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n\n", false );
        }
 
        function testOutputWNullChannelStringNLString() {
                $this->m->output( "foo\nbar", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar", false );
        }
 
        function testOutputWNullChannelStringNLStringNL() {
                $this->m->output( "foo\nbar\n", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputWNullChannelStringNLStringNLLinewise() {
                $this->m->output( "foo\n", null );
                $this->m->output( "bar\n", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputWNullChannelStringNLStringNLArbitrary() {
@@ -303,7 +303,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "ba", null );
                $this->m->output( "", null );
                $this->m->output( "r\n", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputWNullChannelStringNLStringNLArbitraryAgain() {
@@ -314,17 +314,17 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "a", null );
                $this->m->output( "", null );
                $this->m->output( "r\n", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputWChannelString() {
                $this->m->output( "foo", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo", True );
+               $this->assertOutputPrePostShutdown( "foo", true );
        }
 
        function testOutputWChannelStringNL() {
                $this->m->output( "foo\n", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo", True );
+               $this->assertOutputPrePostShutdown( "foo", true );
        }
 
        function testOutputWChannelStringNLNL() {
@@ -333,23 +333,23 @@ class MaintenanceTest extends MediaWikiTestCase {
                // outputChanneled with a string ending in a nl ... which is not allowed
                // according to the documentation of outputChanneled)
                $this->m->output( "foo\n\n", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\n", True );
+               $this->assertOutputPrePostShutdown( "foo\n", true );
        }
 
        function testOutputWChannelStringNLString() {
                $this->m->output( "foo\nbar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputWChannelStringNLStringNL() {
                $this->m->output( "foo\nbar\n", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputWChannelStringNLStringNLLinewise() {
                $this->m->output( "foo\n", "bazChannel" );
                $this->m->output( "bar\n", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar", True );
+               $this->assertOutputPrePostShutdown( "foobar", true );
        }
 
        function testOutputWChannelStringNLStringNLArbitrary() {
@@ -360,7 +360,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "ba", "bazChannel" );
                $this->m->output( "", "bazChannel" );
                $this->m->output( "r\n", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar", True );
+               $this->assertOutputPrePostShutdown( "foobar", true );
        }
 
        function testOutputWChannelStringNLStringNLArbitraryAgain() {
@@ -371,7 +371,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "a", "bazChannel" );
                $this->m->output( "", "bazChannel" );
                $this->m->output( "r\n", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputWMultipleChannelsChannelChange() {
@@ -379,7 +379,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "bar", "bazChannel" );
                $this->m->output( "qux", "quuxChannel" );
                $this->m->output( "corge", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar\nqux\ncorge", True );
+               $this->assertOutputPrePostShutdown( "foobar\nqux\ncorge", true );
        }
 
        function testOutputWMultipleChannelsChannelChangeNL() {
@@ -387,7 +387,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "bar\n", "bazChannel" );
                $this->m->output( "qux\n", "quuxChannel" );
                $this->m->output( "corge", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar\nqux\ncorge", True );
+               $this->assertOutputPrePostShutdown( "foobar\nqux\ncorge", true );
        }
 
        function testOutputWAndWOChannelStringStartWO() {
@@ -395,7 +395,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "bar", "bazChannel" );
                $this->m->output( "qux" );
                $this->m->output( "quux", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar\nquxquux", True );
+               $this->assertOutputPrePostShutdown( "foobar\nquxquux", true );
        }
 
        function testOutputWAndWOChannelStringStartW() {
@@ -403,27 +403,27 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "bar" );
                $this->m->output( "qux", "bazChannel" );
                $this->m->output( "quux" );
-               $this->assertOutputPrePostShutdown( "foo\nbarqux\nquux", False );
+               $this->assertOutputPrePostShutdown( "foo\nbarqux\nquux", false );
        }
 
        function testOutputWChannelTypeSwitch() {
                $this->m->output( "foo", 1 );
                $this->m->output( "bar", 1.0 );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputIntermittentEmpty() {
                $this->m->output( "foo" );
                $this->m->output( "" );
                $this->m->output( "bar" );
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testOutputIntermittentFalse() {
                $this->m->output( "foo" );
                $this->m->output( false );
                $this->m->output( "bar" );
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testOutputIntermittentFalseAfterOtherChannel() {
@@ -431,35 +431,35 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->output( "foo" );
                $this->m->output( false );
                $this->m->output( "bar" );
-               $this->assertOutputPrePostShutdown( "qux\nfoobar", False );
+               $this->assertOutputPrePostShutdown( "qux\nfoobar", false );
        }
 
        function testOutputWNullChannelIntermittentEmpty() {
                $this->m->output( "foo", null );
                $this->m->output( "", null );
                $this->m->output( "bar", null );
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testOutputWNullChannelIntermittentFalse() {
                $this->m->output( "foo", null );
                $this->m->output( false, null );
                $this->m->output( "bar", null );
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testOutputWChannelIntermittentEmpty() {
                $this->m->output( "foo", "bazChannel" );
                $this->m->output( "", "bazChannel" );
                $this->m->output( "bar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar", True );
+               $this->assertOutputPrePostShutdown( "foobar", true );
        }
 
        function testOutputWChannelIntermittentFalse() {
                $this->m->output( "foo", "bazChannel" );
                $this->m->output( false, "bazChannel" );
                $this->m->output( "bar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar", True );
+               $this->assertOutputPrePostShutdown( "foobar", true );
        }
 
        // Note that (per documentation) outputChanneled does take strings that end
@@ -467,23 +467,23 @@ class MaintenanceTest extends MediaWikiTestCase {
 
        function testOutputChanneledEmpty() {
                $this->m->outputChanneled( "" );
-               $this->assertOutputPrePostShutdown( "\n", False );
+               $this->assertOutputPrePostShutdown( "\n", false );
        }
 
        function testOutputChanneledString() {
                $this->m->outputChanneled( "foo" );
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testOutputChanneledStringString() {
                $this->m->outputChanneled( "foo" );
                $this->m->outputChanneled( "bar" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputChanneledStringNLString() {
                $this->m->outputChanneled( "foo\nbar" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputChanneledStringNLStringNLArbitraryAgain() {
@@ -494,28 +494,28 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "a" );
                $this->m->outputChanneled( "" );
                $this->m->outputChanneled( "r" );
-               $this->assertOutputPrePostShutdown( "\nfoo\n\n\nb\na\n\nr\n", False );
+               $this->assertOutputPrePostShutdown( "\nfoo\n\n\nb\na\n\nr\n", false );
        }
 
        function testOutputChanneledWNullChannelEmpty() {
                $this->m->outputChanneled( "", null );
-               $this->assertOutputPrePostShutdown( "\n", False );
+               $this->assertOutputPrePostShutdown( "\n", false );
        }
 
        function testOutputChanneledWNullChannelString() {
                $this->m->outputChanneled( "foo", null );
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testOutputChanneledWNullChannelStringString() {
                $this->m->outputChanneled( "foo", null );
                $this->m->outputChanneled( "bar", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputChanneledWNullChannelStringNLString() {
                $this->m->outputChanneled( "foo\nbar", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputChanneledWNullChannelStringNLStringNLArbitraryAgain() {
@@ -526,23 +526,23 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "a", null );
                $this->m->outputChanneled( "", null );
                $this->m->outputChanneled( "r", null );
-               $this->assertOutputPrePostShutdown( "\nfoo\n\n\nb\na\n\nr\n", False );
+               $this->assertOutputPrePostShutdown( "\nfoo\n\n\nb\na\n\nr\n", false );
        }
 
        function testOutputChanneledWChannelString() {
                $this->m->outputChanneled( "foo", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo", True );
+               $this->assertOutputPrePostShutdown( "foo", true );
        }
 
        function testOutputChanneledWChannelStringNLString() {
                $this->m->outputChanneled( "foo\nbar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputChanneledWChannelStringString() {
                $this->m->outputChanneled( "foo", "bazChannel" );
                $this->m->outputChanneled( "bar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar", True );
+               $this->assertOutputPrePostShutdown( "foobar", true );
        }
 
        function testOutputChanneledWChannelStringNLStringNLArbitraryAgain() {
@@ -553,7 +553,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "a", "bazChannel" );
                $this->m->outputChanneled( "", "bazChannel" );
                $this->m->outputChanneled( "r", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputChanneledWMultipleChannelsChannelChange() {
@@ -561,7 +561,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "bar", "bazChannel" );
                $this->m->outputChanneled( "qux", "quuxChannel" );
                $this->m->outputChanneled( "corge", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar\nqux\ncorge", True );
+               $this->assertOutputPrePostShutdown( "foobar\nqux\ncorge", true );
        }
 
        function testOutputChanneledWMultipleChannelsChannelChangeEnclosedNull() {
@@ -569,7 +569,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "bar", null );
                $this->m->outputChanneled( "qux", null );
                $this->m->outputChanneled( "corge", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\ncorge", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\ncorge", true );
        }
 
        function testOutputChanneledWMultipleChannelsChannelAfterNullChange() {
@@ -577,7 +577,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "bar", null );
                $this->m->outputChanneled( "qux", null );
                $this->m->outputChanneled( "corge", "quuxChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\ncorge", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\ncorge", true );
        }
 
        function testOutputChanneledWAndWOChannelStringStartWO() {
@@ -585,7 +585,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "bar", "bazChannel" );
                $this->m->outputChanneled( "qux" );
                $this->m->outputChanneled( "quux", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\nquux", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\nquux", true );
        }
 
        function testOutputChanneledWAndWOChannelStringStartW() {
@@ -593,114 +593,114 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->outputChanneled( "bar" );
                $this->m->outputChanneled( "qux", "bazChannel" );
                $this->m->outputChanneled( "quux" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\nquux\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\nqux\nquux\n", false );
        }
 
        function testOutputChanneledWChannelTypeSwitch() {
                $this->m->outputChanneled( "foo", 1 );
                $this->m->outputChanneled( "bar", 1.0 );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testOutputChanneledWOChannelIntermittentEmpty() {
                $this->m->outputChanneled( "foo" );
                $this->m->outputChanneled( "" );
                $this->m->outputChanneled( "bar" );
-               $this->assertOutputPrePostShutdown( "foo\n\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n\nbar\n", false );
        }
 
        function testOutputChanneledWOChannelIntermittentFalse() {
                $this->m->outputChanneled( "foo" );
                $this->m->outputChanneled( false );
                $this->m->outputChanneled( "bar" );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputChanneledWNullChannelIntermittentEmpty() {
                $this->m->outputChanneled( "foo", null );
                $this->m->outputChanneled( "", null );
                $this->m->outputChanneled( "bar", null );
-               $this->assertOutputPrePostShutdown( "foo\n\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n\nbar\n", false );
        }
 
        function testOutputChanneledWNullChannelIntermittentFalse() {
                $this->m->outputChanneled( "foo", null );
                $this->m->outputChanneled( false, null );
                $this->m->outputChanneled( "bar", null );
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testOutputChanneledWChannelIntermittentEmpty() {
                $this->m->outputChanneled( "foo", "bazChannel" );
                $this->m->outputChanneled( "", "bazChannel" );
                $this->m->outputChanneled( "bar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foobar", True );
+               $this->assertOutputPrePostShutdown( "foobar", true );
        }
 
        function testOutputChanneledWChannelIntermittentFalse() {
                $this->m->outputChanneled( "foo", "bazChannel" );
                $this->m->outputChanneled( false, "bazChannel" );
                $this->m->outputChanneled( "bar", "bazChannel" );
-               $this->assertOutputPrePostShutdown( "foo\nbar", True );
+               $this->assertOutputPrePostShutdown( "foo\nbar", true );
        }
 
        function testCleanupChanneledClean() {
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "", False );
+               $this->assertOutputPrePostShutdown( "", false );
        }
 
        function testCleanupChanneledAfterOutput() {
                $this->m->output( "foo" );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo", False );
+               $this->assertOutputPrePostShutdown( "foo", false );
        }
 
        function testCleanupChanneledAfterOutputWNullChannel() {
                $this->m->output( "foo", null );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo", False );
+               $this->assertOutputPrePostShutdown( "foo", false );
        }
 
        function testCleanupChanneledAfterOutputWChannel() {
                $this->m->output( "foo", "bazChannel" );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testCleanupChanneledAfterNLOutput() {
                $this->m->output( "foo\n" );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testCleanupChanneledAfterNLOutputWNullChannel() {
                $this->m->output( "foo\n", null );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testCleanupChanneledAfterNLOutputWChannel() {
                $this->m->output( "foo\n", "bazChannel" );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testCleanupChanneledAfterOutputChanneledWOChannel() {
                $this->m->outputChanneled( "foo" );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testCleanupChanneledAfterOutputChanneledWNullChannel() {
                $this->m->outputChanneled( "foo", null );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testCleanupChanneledAfterOutputChanneledWChannel() {
                $this->m->outputChanneled( "foo", "bazChannel" );
                $this->m->cleanupChanneled();
-               $this->assertOutputPrePostShutdown( "foo\n", False );
+               $this->assertOutputPrePostShutdown( "foo\n", false );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutput() {
@@ -712,7 +712,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foobar", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputWNullChannel() {
@@ -724,7 +724,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foobar", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foobar", False );
+               $this->assertOutputPrePostShutdown( "foobar", false );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputWChannel() {
@@ -736,7 +736,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foobar", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foobar\n", True );
+               $this->assertOutputPrePostShutdown( "foobar\n", true );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputWNullChannelNL() {
@@ -748,7 +748,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputWChannelNL() {
@@ -760,7 +760,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foobar", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foobar\n", True );
+               $this->assertOutputPrePostShutdown( "foobar\n", true );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputChanneled() {
@@ -772,7 +772,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputChanneledWNullChannel() {
@@ -784,7 +784,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+               $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
        }
 
        function testMultipleMaintenanceObjectsInteractionOutputChanneledWChannel() {
@@ -796,7 +796,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->assertEquals( "foobar", $this->getActualOutput(),
                                "Output before shutdown simulation (m2)" );
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foobar\n", True );
+               $this->assertOutputPrePostShutdown( "foobar\n", true );
        }
 
        function testMultipleMaintenanceObjectsInteractionCleanupChanneledWChannel() {
@@ -815,7 +815,7 @@ class MaintenanceTest extends MediaWikiTestCase {
                                "Output after second cleanup" );
 
                $m2->simulateShutdown();
-               $this->assertOutputPrePostShutdown( "foobar\n\n", False );
+               $this->assertOutputPrePostShutdown( "foobar\n\n", false );
        }
 
 
index 2ebb351..5930e9b 100644 (file)
@@ -156,7 +156,7 @@ class TextPassDumperTest extends DumpTestCase {
                );
 
                // The mock itself
-               $prefetchMock = $this->getMock( 'BaseDump', array( 'prefetch' ), array(), '', FALSE );
+               $prefetchMock = $this->getMock( 'BaseDump', array( 'prefetch' ), array(), '', false );
                $prefetchMock->expects( $this->exactly( 6 ) )
                        ->method( 'prefetch' )
                        ->will( $this->returnValueMap( $prefetchMap ) );
@@ -230,7 +230,7 @@ class TextPassDumperTest extends DumpTestCase {
                $nameOutputDir = $this->getNewTempDirectory();
 
                $stderr = fopen( 'php://output', 'a' );
-               if ( $stderr === FALSE ) {
+               if ( $stderr === false ) {
                        $this->fail( "Could not open stream for stderr" );
                }
 
index 8a8dea5..0aed411 100644 (file)
@@ -186,7 +186,7 @@ class BackupDumperLoggerTest extends DumpTestCase {
                // to be able to alert (once dumping produces reports) that this test
                // needs updates.
                $dumper->stderr = fopen( 'php://output', 'a' );
-               if ( $dumper->stderr === FALSE ) {
+               if ( $dumper->stderr === false ) {
                        $this->fail( "Could not open stream for stderr" );
                }
 
index 6cdc4ec..7966fe8 100644 (file)
@@ -302,7 +302,7 @@ class BackupDumperPageTest extends DumpTestCase {
                // computer. We only check that reporting does not crash the dumping
                // and that something is reported
                $dumper->stderr = fopen( 'php://output', 'a' );
-               if ( $dumper->stderr === FALSE ) {
+               if ( $dumper->stderr === false ) {
                        $this->fail( "Could not open stream for stderr" );
                }
 
index 8041e35..04536f8 100644 (file)
@@ -18,7 +18,7 @@ class SemiMockedFetchText extends FetchText {
        /**
         * @var bool Whether or not a text for stdin has been provided
         */
-       private $mockSetUp = False;
+       private $mockSetUp = false;
 
        /**
         * @var Array Invocation counters for the mocked aspects
@@ -32,10 +32,9 @@ class SemiMockedFetchText extends FetchText {
         *
         * @param $stdin String The string to be used instead of stdin
         */
-       function mockStdin( $stdin )
-       {
+       function mockStdin( $stdin ) {
                $this->mockStdinText = $stdin;
-               $this->mockSetUp = True;
+               $this->mockSetUp = true;
        }
 
        /**
@@ -44,16 +43,14 @@ class SemiMockedFetchText extends FetchText {
         * @return Array An array, whose keys are function names. The corresponding values
         * denote the number of times the function has been invoked.
         */
-       function mockGetInvocations()
-       {
+       function mockGetInvocations() {
                return $this->mockInvocations;
        }
 
        // -----------------------------------------------------------------
        // Mocked functions from FetchText follow.
 
-       function getStdin( $len = null )
-       {
+       function getStdin( $len = null ) {
                $this->mockInvocations['getStdin']++;
                if ( $len !== null ) {
                        throw new PHPUnit_Framework_ExpectationFailedException(
index 0b7c758..699571b 100644 (file)
@@ -52,11 +52,11 @@ class GetSlaveServerTest extends MediaWikiTestCase {
 
                // The main answer
                $output = $this->getActualOutput();
-               $firstLineEndPos = strpos( $output,"\n");
-               if ( $firstLineEndPos === FALSE ) {
+               $firstLineEndPos = strpos( $output, "\n" );
+               if ( $firstLineEndPos === false ) {
                        $this->fail( "Could not find end of first line of output" );
                }
-               $firstLine = substr( $output, 0 , $firstLineEndPos );
+               $firstLine = substr( $output, 0, $firstLineEndPos );
                $this->assertRegExp( "/^" . self::getServerRE() . "$/D",
                        $firstLine, "DB Server" );
 
index 89337f4..85ed0b4 100644 (file)
@@ -10,10 +10,6 @@ class SideBarTest extends MediaWikiLangTestCase {
        /** Local cache for sidebar messages */
        private $messages;
 
-       function __construct() {
-               parent::__construct();
-       }
-
        /** Build $this->messages array */
        private function initMessagesHref() {
                # List of default messages for the sidebar: