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:
class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
class MediaWikiPHPUnitCommand extends PHPUnit_TextUI_Command {
- static $additionalOptions = array(
+ public static $additionalOptions = array(
'regex=' => false,
'file=' => false,
'use-filebackend=' => false,
'regex=' => false,
'file=' => false,
'use-filebackend=' => false,
$this->backupStaticAttributes = false;
}
$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.
/* 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.
'page_id' => 0,
'page_namespace' => 0,
'page_title' => ' ',
'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,
'page_counter' => 0,
'page_is_redirect' => 0,
'page_is_new' => 0,
return $this->assertTrue( $value == '', $msg );
}
return $this->assertTrue( $value == '', $msg );
}
- static private function unprefixTable( $tableName ) {
+ private static function unprefixTable( $tableName ) {
global $wgDBprefix;
return substr( $tableName, strlen( $wgDBprefix ) );
}
global $wgDBprefix;
return substr( $tableName, strlen( $wgDBprefix ) );
}
- static private function isNotUnittest( $table ) {
+ private static function isNotUnittest( $table ) {
return strpos( $table, 'unittest_' ) !== 0;
}
return strpos( $table, 'unittest_' ) !== 0;
}
'GPSVersionID' => '2.2.0.0'
)
);
'GPSVersionID' => '2.2.0.0'
)
);
// Reload block from DB
$userBlock = Block::newFromTarget( $username );
$this->assertTrue(
// 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'"
);
"Block object in DB should prevents 'createaccount'"
);
// Reload user
$u = User::newFromName( $username );
$this->assertTrue(
// 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"
);
}
"Our sandbox user '$username' should NOT be able to create account"
);
}
$block = Block::newFromID( $res['id'] );
$this->assertEquals( 'UserOnForeignWiki', $block->getTarget()->getName(), 'Correct blockee name' );
$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' );
$this->assertEquals( 'MetaWikiUser', $block->getBlocker(), 'Correct blocker name' );
$this->assertEquals( 'MetaWikiUser', $block->getByName(), 'Correct blocker name' );
$this->assertEquals( 0, $block->getBy(), 'Correct blocker id' );
* @dataProvider provideXdiffAdler32
*/
function testXdiffAdler32( $input ) {
* @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 ),
$dhb = new DiffHistoryBlob;
$myHash = $dhb->xdiffAdler32( $input );
$this->assertSame( bin2hex( $xdiffHash ), bin2hex( $myHash ),
return $this->data[$cluster][$id];
}
return $this->data[$cluster][$id];
}
-}
\ No newline at end of file
/* Test the parser entry points */
function testParse() {
$title = Title::newFromText( __FUNCTION__ );
/* 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() );
}
$this->assertEquals( "<p>Test\nContent of <i>Template:Foo</i>\nContent of <i>Template:Bar</i>\n</p>", $parserOutput->getText() );
}
function testPreprocess() {
$title = Title::newFromText( __FUNCTION__ );
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 );
}
$this->assertEquals( "Test\nContent of ''Template:Foo''\nContent of ''Template:Bar''", $outputText );
}
$catName = wfMessage( 'broken-file-category' )->inContentLanguage()->text();
$cat = Title::makeTitleSafe( NS_CATEGORY, $catName );
$expected = array( $cat->getDBkey() );
$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 );
}
$result = $parserOutput->getCategoryLinks();
$this->assertEquals( $expected, $result );
}
function testTrackingCategorySpecial() {
// Special pages shouldn't have tracking cats.
$title = SpecialPage::getTitleFor( 'Contributions' );
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 );
}
$result = $parserOutput->getCategoryLinks();
$this->assertEmpty( $result );
}
}
public function testAddIntegers() {
}
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(
$this->assertEquals(
array(
'negone' => array(
'value' => null,
'consumed' => false,
'type' => FormOptions::INT,
'value' => null,
'consumed' => false,
'type' => FormOptions::INT,
$this->object = new FormOptions;
$this->object->add( 'string1', 'string one' );
$this->object->add( 'string2', 'string two' );
$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() */
}
/** Helpers for testGuessType() */
}
/* TODO: many more! */
}
}
/* TODO: many more! */
}
$this->assertEquals( "wfGetCaller::intermediateFunction", self::intermediateFunction( $i + 1, $i ) );
}
}
$this->assertEquals( "wfGetCaller::intermediateFunction", self::intermediateFunction( $i + 1, $i ) );
}
}
class NothingClass {
public $calls = 0;
class NothingClass {
public $calls = 0;
- static public function someStatic( &$foo, &$bar ) {
+ public static function someStatic( &$foo, &$bar ) {
$foo = 'bah';
return true;
}
$foo = 'bah';
return true;
}
function testIsValidUri( $expect, $URI, $message = '' ) {
$this->assertEquals(
$expect,
function testIsValidUri( $expect, $URI, $message = '' ) {
$this->assertEquals(
$expect,
- (bool) Http::isValidURI( $URI ),
+ (bool)Http::isValidURI( $URI ),
$c = sprintf( "%01d", $i );
foreach ( array_unique( array( $a, $b, $c ) ) as $f ) {
$ip = "$f.$f.$f.$f";
$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 ) {
}
}
foreach ( range( 0x0, 0xFFFF, 0xF ) as $i ) {
$c = sprintf( "%02x", $i );
foreach ( array_unique( array( $a, $b, $c ) ) as $f ) {
$ip = "$f:$f:$f:$f:$f:$f:$f:$f";
$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
}
}
// test with some abbreviations
$c = sprintf( "%02s", $i );
foreach ( array_unique( array( $a, $b, $c ) ) as $f ) {
$ip = "$f:$f:$f:$f:$f:$f:$f:$f";
$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" );
*/
public function testip2longWrapper() {
// @todo FIXME: Add more tests ?
*/
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 ) );
}
$i = 'IN.VA.LI.D';
$this->assertFalse( IP::toUnSigned( $i ) );
}
$this->assertSelect( $table, $fields, $condition, $expectedRows );
}
}
$this->assertSelect( $table, $fields, $condition, $expectedRows );
}
}
$this->assertThat( $file, $this->isInstanceOf( 'LocalFile' ), 'wfLocalFile() returns LocalFile for valid Titles' );
}
}
$this->assertThat( $file, $this->isInstanceOf( 'LocalFile' ), 'wfLocalFile() returns LocalFile for valid Titles' );
}
}
$this->assertFalse( MWNamespace::subjectEquals( $ns1, $ns2, $msg ) );
}
}
$this->assertFalse( MWNamespace::subjectEquals( $ns1, $ns2, $msg ) );
}
}
/**
* @covers Revision::__construct
*/
/**
* @covers Revision::__construct
*/
- public function testConstructFromRow()
- {
+ public function testConstructFromRow() {
$orig = $this->makeRevision();
$dbr = wfgetDB( DB_SLAVE );
$orig = $this->makeRevision();
$dbr = wfgetDB( DB_SLAVE );
/**
* @covers Revision::newFromRow
*/
/**
* @covers Revision::newFromRow
*/
- public function testNewFromRow()
- {
+ public function testNewFromRow() {
$orig = $this->makeRevision();
$dbr = wfgetDB( DB_SLAVE );
$orig = $this->makeRevision();
$dbr = wfgetDB( DB_SLAVE );
/**
* @covers Revision::newFromArchiveRow
*/
/**
* @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' );
$page = $this->createPage( 'RevisionStorageTest_testNewFromArchiveRow', 'Lorem Ipsum', CONTENT_MODEL_WIKITEXT );
$orig = $page->getRevision();
$page->doDeleteArticle( 'test Revision::newFromArchiveRow' );
/**
* @covers Revision::newFromId
*/
/**
* @covers Revision::newFromId
*/
- public function testNewFromId()
- {
+ public function testNewFromId() {
$orig = $this->makeRevision();
$rev = Revision::newFromId( $orig->getId() );
$orig = $this->makeRevision();
$rev = Revision::newFromId( $orig->getId() );
/**
* @covers Revision::fetchRevision
*/
/**
* @covers Revision::fetchRevision
*/
- public function testFetchRevision()
- {
+ public function testFetchRevision() {
$page = $this->createPage( 'RevisionStorageTest_testFetchRevision', 'one', CONTENT_MODEL_WIKITEXT );
$id1 = $page->getRevision()->getId();
$page = $this->createPage( 'RevisionStorageTest_testFetchRevision', 'one', CONTENT_MODEL_WIKITEXT );
$id1 = $page->getRevision()->getId();
/**
* @covers Revision::selectFields
*/
/**
* @covers Revision::selectFields
*/
- public function testSelectFields()
- {
+ public function testSelectFields() {
global $wgContentHandlerUseDB;
$fields = Revision::selectFields();
global $wgContentHandlerUseDB;
$fields = Revision::selectFields();
/**
* @covers Revision::getPage
*/
/**
* @covers Revision::getPage
*/
- public function testGetPage()
- {
+ public function testGetPage() {
$page = $this->the_page;
$orig = $this->makeRevision( array( 'page' => $page->getId() ) );
$page = $this->the_page;
$orig = $this->makeRevision( array( 'page' => $page->getId() ) );
/**
* @covers Revision::getText
*/
/**
* @covers Revision::getText
*/
- public function testGetText()
- {
+ public function testGetText() {
$this->hideDeprecated( 'Revision::getText' );
$orig = $this->makeRevision( array( 'text' => 'hello hello.' ) );
$this->hideDeprecated( 'Revision::getText' );
$orig = $this->makeRevision( array( 'text' => 'hello hello.' ) );
/**
* @covers Revision::getContent
*/
/**
* @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(),
$rev = new Revision( array(
'page' => $this->the_page->getId(),
'content_model' => $this->the_page->getContentModel(),
/**
* @covers Revision::getContent
*/
/**
* @covers Revision::getContent
*/
- public function testGetContent()
- {
+ public function testGetContent() {
$orig = $this->makeRevision( array( 'text' => 'hello hello.' ) );
$rev = Revision::newFromId( $orig->getId() );
$orig = $this->makeRevision( array( 'text' => 'hello hello.' ) );
$rev = Revision::newFromId( $orig->getId() );
/**
* @covers Revision::revText
*/
/**
* @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() );
$this->hideDeprecated( 'Revision::revText' );
$orig = $this->makeRevision( array( 'text' => 'hello hello rev.' ) );
$rev = Revision::newFromId( $orig->getId() );
/**
* @covers Revision::getRawText
*/
/**
* @covers Revision::getRawText
*/
- public function testGetRawText()
- {
+ public function testGetRawText() {
$this->hideDeprecated( 'Revision::getRawText' );
$orig = $this->makeRevision( array( 'text' => 'hello hello raw.' ) );
$this->hideDeprecated( 'Revision::getRawText' );
$orig = $this->makeRevision( array( 'text' => 'hello hello raw.' ) );
/**
* @covers Revision::getContentModel
*/
/**
* @covers Revision::getContentModel
*/
- public function testGetContentModel()
- {
+ public function testGetContentModel() {
global $wgContentHandlerUseDB;
if ( !$wgContentHandlerUseDB ) {
global $wgContentHandlerUseDB;
if ( !$wgContentHandlerUseDB ) {
/**
* @covers Revision::getContentFormat
*/
/**
* @covers Revision::getContentFormat
*/
- public function testGetContentFormat()
- {
+ public function testGetContentFormat() {
global $wgContentHandlerUseDB;
if ( !$wgContentHandlerUseDB ) {
global $wgContentHandlerUseDB;
if ( !$wgContentHandlerUseDB ) {
/**
* @covers Revision::isCurrent
*/
/**
* @covers Revision::isCurrent
*/
- public function testIsCurrent()
- {
+ public function testIsCurrent() {
$page = $this->createPage( 'RevisionStorageTest_testIsCurrent', 'Lorem Ipsum', CONTENT_MODEL_WIKITEXT );
$rev1 = $page->getRevision();
$page = $this->createPage( 'RevisionStorageTest_testIsCurrent', 'Lorem Ipsum', CONTENT_MODEL_WIKITEXT );
$rev1 = $page->getRevision();
/**
* @covers Revision::getPrevious
*/
/**
* @covers Revision::getPrevious
*/
- public function testGetPrevious()
- {
+ public function testGetPrevious() {
$page = $this->createPage( 'RevisionStorageTest_testGetPrevious', 'Lorem Ipsum testGetPrevious', CONTENT_MODEL_WIKITEXT );
$rev1 = $page->getRevision();
$page = $this->createPage( 'RevisionStorageTest_testGetPrevious', 'Lorem Ipsum testGetPrevious', CONTENT_MODEL_WIKITEXT );
$rev1 = $page->getRevision();
/**
* @covers Revision::getNext
*/
/**
* @covers Revision::getNext
*/
- public function testGetNext()
- {
+ public function testGetNext() {
$page = $this->createPage( 'RevisionStorageTest_testGetNext', 'Lorem Ipsum testGetNext', CONTENT_MODEL_WIKITEXT );
$rev1 = $page->getRevision();
$page = $this->createPage( 'RevisionStorageTest_testGetNext', 'Lorem Ipsum testGetNext', CONTENT_MODEL_WIKITEXT );
$rev1 = $page->getRevision();
/**
* @covers Revision::newNullRevision
*/
/**
* @covers Revision::newNullRevision
*/
- public function testNewNullRevision()
- {
+ public function testNewNullRevision() {
$page = $this->createPage( 'RevisionStorageTest_testNewNullRevision', 'some testing text', CONTENT_MODEL_WIKITEXT );
$orig = $page->getRevision();
$page = $this->createPage( 'RevisionStorageTest_testNewNullRevision', 'some testing text', CONTENT_MODEL_WIKITEXT );
$orig = $page->getRevision();
* @group Database
* @dataProvider dataGetSize
*/
* @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() );
}
$rev = $this->newTestRevision( $text, 'RevisionTest_testGetSize', $model );
$this->assertEquals( $expected_size, $rev->getSize() );
}
* @group Database
* @dataProvider dataGetSha1
*/
* @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() );
}
$rev = $this->newTestRevision( $text, 'RevisionTest_testGetSha1', $model );
$this->assertEquals( $expected_hash, $rev->getSha1() );
}
$this->assertEquals( "Test", $title->isLocal() );
}
}
$this->assertEquals( "Test", $title->isLocal() );
}
}
SeleniumConfig::getSeleniumSettings($seleniumSettings,
$seleniumBrowsers,
$seleniumTestSuites);
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,
'The selenium settings should have been read from the file defined in $wgSeleniumConfigFile'
);
$this->assertEquals($seleniumBrowsers, $this->testBrowsers0,
private function writeToTempFile($textToWrite) {
$this->tempFileName = tempnam(sys_get_temp_dir(), 'test_settings.');
$tempFile = fopen( $this->tempFileName, "w" );
private function writeToTempFile($textToWrite) {
$this->tempFileName = tempnam(sys_get_temp_dir(), 'test_settings.');
$tempFile = fopen( $this->tempFileName, "w" );
- fwrite($tempFile , $textToWrite);
+ fwrite($tempFile, $textToWrite);
$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['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' );
*/
function testValidOutput( $format, $expected, $original ) {
$timestamp = new MWTimestamp( $original );
*/
function testValidOutput( $format, $expected, $original ) {
$timestamp = new MWTimestamp( $original );
- $this->assertEquals( $expected, (string) $timestamp->getTimestamp( $format ) );
+ $this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
// let the user have a few (3) edits
$page = WikiPage::factory( Title::newFromText( 'Help:UserTest_EditCount' ) );
for( $i = 0; $i < 3; $i++ ) {
// 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();
}
$user->clearInstanceCache();
- function fakeUploadChunk( $fieldName, $fileName, $type, & $chunkData ){
+ function fakeUploadChunk( $fieldName, $fileName, $type, & $chunkData ) {
$tmpName = tempnam( wfTempDir(), "" );
$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" );
}
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" );
}
clearstatcache();
$size = filesize( $tmpName );
if ( $size === false ) {
throw new Exception( "couldn't stat $tmpName" );
}
$_FILES[ $fieldName ] = array(
'name' => $fileName,
'type' => $type,
$_FILES[ $fieldName ] = array(
'name' => $fileName,
'type' => $type,
class ApiFormatPhpTest extends ApiFormatTestBase {
function testValidPhpSyntax() {
class ApiFormatPhpTest extends ApiFormatTestBase {
function testValidPhpSyntax() {
$data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
$data = $this->apiRequest( 'php', array( 'action' => 'query', 'meta' => 'siteinfo' ) );
$this->assertInternalType( 'array', unserialize( $data ) );
$this->assertInternalType( 'array', unserialize( $data ) );
- $this->assertGreaterThan( 0, count( (array) $data ) );
-
-
+ $this->assertGreaterThan( 0, count( (array)$data ) );
+
$maintClass = 'GenerateRandomImages';
require( RUN_MAINTENANCE_IF_MAIN );
$maintClass = 'GenerateRandomImages';
require( RUN_MAINTENANCE_IF_MAIN );
if ( $expected ) {
$this->assertNotNull( $name, "no name found for content model $id" );
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 {
"content model name for #$id did not match pattern $expected"
);
} else {
* @return mixed the native representation of the content. Could be a string, a nested array
* structure, an object, a binary blob... anything, really.
*/
* @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 ParserOutput
*/
*
* @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() );
}
}
return new ParserOutput( $this->getNativeData() );
}
}
-}
\ No newline at end of file
- function replaceVars( $s ) {
+ /**
+ * Override parent visibility to public
+ */
+ public function replaceVars( $s ) {
return parent::replaceVars( $s );
}
}
return parent::replaceVars( $s );
}
}
* @since 1.20
* @return string
*/
* @since 1.20
* @return string
*/
- protected abstract function getRowClass();
+ abstract protected function getRowClass();
/**
* @since 1.20
* @return IORMTable
*/
/**
* @since 1.20
* @return IORMTable
*/
- protected abstract function getTableInstance();
+ abstract protected function getTableInstance();
/**
* @since 1.20
* @return array
*/
/**
* @since 1.20
* @return array
*/
- public abstract function constructorTestProvider();
+ abstract public function constructorTestProvider();
// TODO: test all of the methods!
// TODO: test all of the methods!
-}
\ No newline at end of file
$status = $this->prepare( array( 'dir' => dirname( $path ) ) );
$this->assertGoodStatus( $status,
"Preparing $path succeeded without warnings ($backendName)." );
$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' );
$purgeOps[] = array( 'op' => 'delete', 'src' => $path );
}
$purgeOps[] = array( 'op' => 'null' );
$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}" );
$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;
if ( $fromrepo ) {
$f = $this->storeit( "Other-$fn", $infn, FileRepo::OVERWRITE);
$infn = $f->value;
$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}" );
$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 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 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);
// This should fail because we're overwriting different content.
if ( $fromrepo ) {
$f = $this->storeit( "Other-$fn", $otherfn, FileRepo::OVERWRITE);
$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}" );
$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() {
}
public function teststore() {
- public abstract function elementInstancesProvider();
+ abstract public function elementInstancesProvider();
/**
* Returns the name of the concrete class being tested.
/**
* Returns the name of the concrete class being tested.
- public abstract function getInstanceClass();
+ abstract public function getInstanceClass();
/**
* Provides instances of the concrete class being tested.
/**
* Provides instances of the concrete class being tested.
'log-description-phpunit' => 'Log for PHPUnit-tests',
'logentry-phpunit-test' => '$1 {{GENDER:$2|tests}} with page $3',
'logentry-phpunit-param' => '$4',
'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
const TEST_WIDTH = 100;
const TEST_HEIGHT = 200;
const TEST_WIDTH = 100;
const TEST_HEIGHT = 200;
/**
* @dataProvider provideBitmapExtractPreRotationDimensions
*/
function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
$result = $this->handler->extractPreRotationDimensions( array(
/**
* @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 );
}
'physicalHeight' => self::TEST_HEIGHT,
), $rotation );
$this->assertEquals( $expected, $result );
}
function provideBitmapExtractPreRotationDimensions() {
return array(
array(
0,
function provideBitmapExtractPreRotationDimensions() {
return array(
array(
0,
- array( self::TEST_WIDTH, self::TEST_HEIGHT )
+ array( self::TEST_WIDTH, self::TEST_HEIGHT )
- array( self::TEST_HEIGHT, self::TEST_WIDTH )
+ array( self::TEST_HEIGHT, self::TEST_WIDTH )
- array( self::TEST_WIDTH, self::TEST_HEIGHT )
+ array( self::TEST_WIDTH, self::TEST_HEIGHT )
- array( self::TEST_HEIGHT, self::TEST_WIDTH )
+ array( self::TEST_HEIGHT, self::TEST_WIDTH )
* - pcntl_fork is supported by the system
* - cache type will correctly support calls over forks
*/
* - 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;
$fork &= function_exists( 'pcntl_fork' );
$fork &= !$this->cache instanceof HashBagOStuff;
$fork &= !$this->cache instanceof EmptyBagOStuff;
*/
private function assertMagic( $expected, $magic ) {
if( in_array( $magic, $this->expectedAsInteger ) ) {
*/
private function assertMagic( $expected, $magic ) {
if( in_array( $magic, $this->expectedAsInteger ) ) {
- $expected = (int) $expected;
+ $expected = (int)$expected;
}
# Generate a message for the assertion
}
# Generate a message for the assertion
* and then was ucfirst( basename( $filename, '.txt' )
* but that didn't work with names like foo.tests.txt
*/
* 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( "'" => "\\'", '\\' => '\\\\' ) ) . "'; } " );
eval( "/** @group Database\n@group Parser\n*/ class $className extends NewParserTest { protected \$file = '" . strtr( $filename, array( "'" => "\\'", '\\' => '\\\\' ) ) . "'; } " );
// TODO: Add tests for cleanSig() / cleanSigInSig(), getSection(), replaceSection(), getPreloadText()
}
// TODO: Add tests for cleanSig() / cleanSigInSig(), getSection(), replaceSection(), getPreloadText()
}
$this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
}
}
$this->assertEquals( $this->normalizeXml( $expectedXml ), $this->preprocessToXml( $wikiText ) );
}
}
-}
\ No newline at end of file
$this->assertEquals( $serialization, serialize( $newInstance ) );
}
$this->assertEquals( $serialization, serialize( $newInstance ) );
}
-}
\ No newline at end of file
$sitesTable->saveSites( TestSites::getSites() );
}
$sitesTable->saveSites( TestSites::getSites() );
}
-}
\ No newline at end of file
/** see bug 29495 */
/** @dataProvider providerFormatNum*/
function testFormatNum( $result, $value ) {
/** 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() {
}
function providerFormatNum() {
*/
function testBuiltInCodeValidation( $code, $message = '' ) {
$this->assertTrue(
*/
function testBuiltInCodeValidation( $code, $message = '' ) {
$this->assertTrue(
- (bool) Language::isValidBuiltInCode( $code ),
+ (bool)Language::isValidBuiltInCode( $code ),
"validating code $code $message"
);
}
function testBuiltInCodeValidationRejectUnderscore() {
$this->assertFalse(
"validating code $code $message"
);
}
function testBuiltInCodeValidationRejectUnderscore() {
$this->assertFalse(
- (bool) Language::isValidBuiltInCode( 'be_tarask' ),
+ (bool)Language::isValidBuiltInCode( 'be_tarask' ),
"reject underscore in language code"
);
}
"reject underscore in language code"
);
}
* @dataProvider validTestCases
*/
function testValidRules( $expected, $rules, $number, $comment ) {
* @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 );
}
$this->assertEquals( $expected, $result, $comment );
}
* @expectedException CLDRPluralRuleError
*/
function testInvalidRules( $rules, $comment ) {
* @expectedException CLDRPluralRuleError
*/
function testInvalidRules( $rules, $comment ) {
- CLDRPluralRuleEvaluator::evaluate( 1, (array) $rules );
+ CLDRPluralRuleEvaluator::evaluate( 1, (array)$rules );
}
function validTestCases() {
}
function validTestCases() {
*/
protected function gunzip( $fname ) {
$gzipped_contents = file_get_contents( $fname );
*/
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
$this->fail( "Could not get contents of $fname" );
}
// We resort to use gzinflate instead of gzdecode, as gzdecode
function testOutputEmpty() {
$this->m->output( "" );
function testOutputEmpty() {
$this->m->output( "" );
- $this->assertOutputPrePostShutdown( "", False );
+ $this->assertOutputPrePostShutdown( "", false );
}
function testOutputString() {
$this->m->output( "foo" );
}
function testOutputString() {
$this->m->output( "foo" );
- $this->assertOutputPrePostShutdown( "foo", False );
+ $this->assertOutputPrePostShutdown( "foo", false );
}
function testOutputStringString() {
$this->m->output( "foo" );
$this->m->output( "bar" );
}
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" );
}
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" );
}
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" );
}
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" );
}
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" );
}
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() {
}
function testOutputStringNLStringNLArbitrary() {
$this->m->output( "ba" );
$this->m->output( "" );
$this->m->output( "r\n" );
$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() {
}
function testOutputStringNLStringNLArbitraryAgain() {
$this->m->output( "a" );
$this->m->output( "" );
$this->m->output( "r\n" );
$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 );
}
function testOutputWNullChannelEmpty() {
$this->m->output( "", null );
- $this->assertOutputPrePostShutdown( "", False );
+ $this->assertOutputPrePostShutdown( "", false );
}
function testOutputWNullChannelString() {
$this->m->output( "foo", null );
}
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 );
}
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 );
}
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 );
}
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 );
}
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 );
}
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 );
}
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() {
}
function testOutputWNullChannelStringNLStringNLArbitrary() {
$this->m->output( "ba", null );
$this->m->output( "", null );
$this->m->output( "r\n", null );
$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() {
}
function testOutputWNullChannelStringNLStringNLArbitraryAgain() {
$this->m->output( "a", null );
$this->m->output( "", null );
$this->m->output( "r\n", null );
$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" );
}
function testOutputWChannelString() {
$this->m->output( "foo", "bazChannel" );
- $this->assertOutputPrePostShutdown( "foo", True );
+ $this->assertOutputPrePostShutdown( "foo", true );
}
function testOutputWChannelStringNL() {
$this->m->output( "foo\n", "bazChannel" );
}
function testOutputWChannelStringNL() {
$this->m->output( "foo\n", "bazChannel" );
- $this->assertOutputPrePostShutdown( "foo", True );
+ $this->assertOutputPrePostShutdown( "foo", true );
}
function testOutputWChannelStringNLNL() {
}
function testOutputWChannelStringNLNL() {
// 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" );
// 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" );
}
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" );
}
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" );
}
function testOutputWChannelStringNLStringNLLinewise() {
$this->m->output( "foo\n", "bazChannel" );
$this->m->output( "bar\n", "bazChannel" );
- $this->assertOutputPrePostShutdown( "foobar", True );
+ $this->assertOutputPrePostShutdown( "foobar", true );
}
function testOutputWChannelStringNLStringNLArbitrary() {
}
function testOutputWChannelStringNLStringNLArbitrary() {
$this->m->output( "ba", "bazChannel" );
$this->m->output( "", "bazChannel" );
$this->m->output( "r\n", "bazChannel" );
$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() {
}
function testOutputWChannelStringNLStringNLArbitraryAgain() {
$this->m->output( "a", "bazChannel" );
$this->m->output( "", "bazChannel" );
$this->m->output( "r\n", "bazChannel" );
$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() {
}
function testOutputWMultipleChannelsChannelChange() {
$this->m->output( "bar", "bazChannel" );
$this->m->output( "qux", "quuxChannel" );
$this->m->output( "corge", "bazChannel" );
$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() {
}
function testOutputWMultipleChannelsChannelChangeNL() {
$this->m->output( "bar\n", "bazChannel" );
$this->m->output( "qux\n", "quuxChannel" );
$this->m->output( "corge", "bazChannel" );
$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() {
}
function testOutputWAndWOChannelStringStartWO() {
$this->m->output( "bar", "bazChannel" );
$this->m->output( "qux" );
$this->m->output( "quux", "bazChannel" );
$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() {
}
function testOutputWAndWOChannelStringStartW() {
$this->m->output( "bar" );
$this->m->output( "qux", "bazChannel" );
$this->m->output( "quux" );
$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 );
}
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" );
}
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" );
}
function testOutputIntermittentFalse() {
$this->m->output( "foo" );
$this->m->output( false );
$this->m->output( "bar" );
- $this->assertOutputPrePostShutdown( "foobar", False );
+ $this->assertOutputPrePostShutdown( "foobar", false );
}
function testOutputIntermittentFalseAfterOtherChannel() {
}
function testOutputIntermittentFalseAfterOtherChannel() {
$this->m->output( "foo" );
$this->m->output( false );
$this->m->output( "bar" );
$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 );
}
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 );
}
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" );
}
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" );
}
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
}
// Note that (per documentation) outputChanneled does take strings that end
function testOutputChanneledEmpty() {
$this->m->outputChanneled( "" );
function testOutputChanneledEmpty() {
$this->m->outputChanneled( "" );
- $this->assertOutputPrePostShutdown( "\n", False );
+ $this->assertOutputPrePostShutdown( "\n", false );
}
function testOutputChanneledString() {
$this->m->outputChanneled( "foo" );
}
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" );
}
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" );
}
function testOutputChanneledStringNLString() {
$this->m->outputChanneled( "foo\nbar" );
- $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+ $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
}
function testOutputChanneledStringNLStringNLArbitraryAgain() {
}
function testOutputChanneledStringNLStringNLArbitraryAgain() {
$this->m->outputChanneled( "a" );
$this->m->outputChanneled( "" );
$this->m->outputChanneled( "r" );
$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 );
}
function testOutputChanneledWNullChannelEmpty() {
$this->m->outputChanneled( "", null );
- $this->assertOutputPrePostShutdown( "\n", False );
+ $this->assertOutputPrePostShutdown( "\n", false );
}
function testOutputChanneledWNullChannelString() {
$this->m->outputChanneled( "foo", null );
}
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 );
}
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 );
}
function testOutputChanneledWNullChannelStringNLString() {
$this->m->outputChanneled( "foo\nbar", null );
- $this->assertOutputPrePostShutdown( "foo\nbar\n", False );
+ $this->assertOutputPrePostShutdown( "foo\nbar\n", false );
}
function testOutputChanneledWNullChannelStringNLStringNLArbitraryAgain() {
}
function testOutputChanneledWNullChannelStringNLStringNLArbitraryAgain() {
$this->m->outputChanneled( "a", null );
$this->m->outputChanneled( "", null );
$this->m->outputChanneled( "r", null );
$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" );
}
function testOutputChanneledWChannelString() {
$this->m->outputChanneled( "foo", "bazChannel" );
- $this->assertOutputPrePostShutdown( "foo", True );
+ $this->assertOutputPrePostShutdown( "foo", true );
}
function testOutputChanneledWChannelStringNLString() {
$this->m->outputChanneled( "foo\nbar", "bazChannel" );
}
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" );
}
function testOutputChanneledWChannelStringString() {
$this->m->outputChanneled( "foo", "bazChannel" );
$this->m->outputChanneled( "bar", "bazChannel" );
- $this->assertOutputPrePostShutdown( "foobar", True );
+ $this->assertOutputPrePostShutdown( "foobar", true );
}
function testOutputChanneledWChannelStringNLStringNLArbitraryAgain() {
}
function testOutputChanneledWChannelStringNLStringNLArbitraryAgain() {
$this->m->outputChanneled( "a", "bazChannel" );
$this->m->outputChanneled( "", "bazChannel" );
$this->m->outputChanneled( "r", "bazChannel" );
$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() {
}
function testOutputChanneledWMultipleChannelsChannelChange() {
$this->m->outputChanneled( "bar", "bazChannel" );
$this->m->outputChanneled( "qux", "quuxChannel" );
$this->m->outputChanneled( "corge", "bazChannel" );
$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() {
}
function testOutputChanneledWMultipleChannelsChannelChangeEnclosedNull() {
$this->m->outputChanneled( "bar", null );
$this->m->outputChanneled( "qux", null );
$this->m->outputChanneled( "corge", "bazChannel" );
$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() {
}
function testOutputChanneledWMultipleChannelsChannelAfterNullChange() {
$this->m->outputChanneled( "bar", null );
$this->m->outputChanneled( "qux", null );
$this->m->outputChanneled( "corge", "quuxChannel" );
$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() {
}
function testOutputChanneledWAndWOChannelStringStartWO() {
$this->m->outputChanneled( "bar", "bazChannel" );
$this->m->outputChanneled( "qux" );
$this->m->outputChanneled( "quux", "bazChannel" );
$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() {
}
function testOutputChanneledWAndWOChannelStringStartW() {
$this->m->outputChanneled( "bar" );
$this->m->outputChanneled( "qux", "bazChannel" );
$this->m->outputChanneled( "quux" );
$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 );
}
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" );
}
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" );
}
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 );
}
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 );
}
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" );
}
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" );
}
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();
}
function testCleanupChanneledClean() {
$this->m->cleanupChanneled();
- $this->assertOutputPrePostShutdown( "", False );
+ $this->assertOutputPrePostShutdown( "", false );
}
function testCleanupChanneledAfterOutput() {
$this->m->output( "foo" );
$this->m->cleanupChanneled();
}
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();
}
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();
}
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();
}
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();
}
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();
}
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();
}
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();
}
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();
}
function testCleanupChanneledAfterOutputChanneledWChannel() {
$this->m->outputChanneled( "foo", "bazChannel" );
$this->m->cleanupChanneled();
- $this->assertOutputPrePostShutdown( "foo\n", False );
+ $this->assertOutputPrePostShutdown( "foo\n", false );
}
function testMultipleMaintenanceObjectsInteractionOutput() {
}
function testMultipleMaintenanceObjectsInteractionOutput() {
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
- $this->assertOutputPrePostShutdown( "foobar", False );
+ $this->assertOutputPrePostShutdown( "foobar", false );
}
function testMultipleMaintenanceObjectsInteractionOutputWNullChannel() {
}
function testMultipleMaintenanceObjectsInteractionOutputWNullChannel() {
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
- $this->assertOutputPrePostShutdown( "foobar", False );
+ $this->assertOutputPrePostShutdown( "foobar", false );
}
function testMultipleMaintenanceObjectsInteractionOutputWChannel() {
}
function testMultipleMaintenanceObjectsInteractionOutputWChannel() {
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
- $this->assertOutputPrePostShutdown( "foobar\n", True );
+ $this->assertOutputPrePostShutdown( "foobar\n", true );
}
function testMultipleMaintenanceObjectsInteractionOutputWNullChannelNL() {
}
function testMultipleMaintenanceObjectsInteractionOutputWNullChannelNL() {
$this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$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() {
}
function testMultipleMaintenanceObjectsInteractionOutputWChannelNL() {
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
- $this->assertOutputPrePostShutdown( "foobar\n", True );
+ $this->assertOutputPrePostShutdown( "foobar\n", true );
}
function testMultipleMaintenanceObjectsInteractionOutputChanneled() {
}
function testMultipleMaintenanceObjectsInteractionOutputChanneled() {
$this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$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() {
}
function testMultipleMaintenanceObjectsInteractionOutputChanneledWNullChannel() {
$this->assertEquals( "foo\nbar\n", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$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() {
}
function testMultipleMaintenanceObjectsInteractionOutputChanneledWChannel() {
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
$this->assertEquals( "foobar", $this->getActualOutput(),
"Output before shutdown simulation (m2)" );
$m2->simulateShutdown();
- $this->assertOutputPrePostShutdown( "foobar\n", True );
+ $this->assertOutputPrePostShutdown( "foobar\n", true );
}
function testMultipleMaintenanceObjectsInteractionCleanupChanneledWChannel() {
}
function testMultipleMaintenanceObjectsInteractionCleanupChanneledWChannel() {
"Output after second cleanup" );
$m2->simulateShutdown();
"Output after second cleanup" );
$m2->simulateShutdown();
- $this->assertOutputPrePostShutdown( "foobar\n\n", False );
+ $this->assertOutputPrePostShutdown( "foobar\n\n", false );
- $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 ) );
$prefetchMock->expects( $this->exactly( 6 ) )
->method( 'prefetch' )
->will( $this->returnValueMap( $prefetchMap ) );
$nameOutputDir = $this->getNewTempDirectory();
$stderr = fopen( 'php://output', 'a' );
$nameOutputDir = $this->getNewTempDirectory();
$stderr = fopen( 'php://output', 'a' );
- if ( $stderr === FALSE ) {
+ if ( $stderr === false ) {
$this->fail( "Could not open stream for stderr" );
}
$this->fail( "Could not open stream for stderr" );
}
// to be able to alert (once dumping produces reports) that this test
// needs updates.
$dumper->stderr = fopen( 'php://output', 'a' );
// 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" );
}
$this->fail( "Could not open stream for stderr" );
}
// computer. We only check that reporting does not crash the dumping
// and that something is reported
$dumper->stderr = fopen( 'php://output', 'a' );
// 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" );
}
$this->fail( "Could not open stream for stderr" );
}
/**
* @var bool Whether or not a text for stdin has been provided
*/
/**
* @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
/**
* @var Array Invocation counters for the mocked aspects
*
* @param $stdin String The string to be used instead of stdin
*/
*
* @param $stdin String The string to be used instead of stdin
*/
- function mockStdin( $stdin )
- {
+ function mockStdin( $stdin ) {
$this->mockStdinText = $stdin;
$this->mockStdinText = $stdin;
- $this->mockSetUp = True;
+ $this->mockSetUp = true;
* @return Array An array, whose keys are function names. The corresponding values
* denote the number of times the function has been invoked.
*/
* @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.
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(
$this->mockInvocations['getStdin']++;
if ( $len !== null ) {
throw new PHPUnit_Framework_ExpectationFailedException(
// The main answer
$output = $this->getActualOutput();
// 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" );
}
$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" );
$this->assertRegExp( "/^" . self::getServerRE() . "$/D",
$firstLine, "DB Server" );
/** Local cache for sidebar messages */
private $messages;
/** 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:
/** Build $this->messages array */
private function initMessagesHref() {
# List of default messages for the sidebar: