aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/parser
diff options
context:
space:
mode:
authorVivek Ghaisas <v.a.ghaisas@gmail.com>2015-09-11 19:14:59 +0530
committerPolybuildr <v.a.ghaisas@gmail.com>2015-09-26 23:06:52 +0000
commitc54766586acab549f186e81eeab259845112809d (patch)
tree302447a967baf2159036bfab83993d195a6e2f38 /tests/phpunit/includes/parser
parente3983a08fd371036ad77bbdb9d3739a1a57f2774 (diff)
downloadmediawikicore-c54766586acab549f186e81eeab259845112809d.tar.gz
mediawikicore-c54766586acab549f186e81eeab259845112809d.zip
Fix issues identified by SpaceBeforeSingleLineComment sniff
Change-Id: I048ccb1fa260e4b7152ca5f09b053defdd72d8f9
Diffstat (limited to 'tests/phpunit/includes/parser')
-rw-r--r--tests/phpunit/includes/parser/MagicVariableTest.php6
-rw-r--r--tests/phpunit/includes/parser/NewParserTest.php22
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/phpunit/includes/parser/MagicVariableTest.php b/tests/phpunit/includes/parser/MagicVariableTest.php
index cd54a9e3c088..8997846597a1 100644
--- a/tests/phpunit/includes/parser/MagicVariableTest.php
+++ b/tests/phpunit/includes/parser/MagicVariableTest.php
@@ -84,7 +84,7 @@ class MagicVariableTest extends MediaWikiTestCase {
return self::createProviderUpTo( 31 );
}
- ############### TESTS #############################################
+ # ############## TESTS #############################################
# @todo FIXME:
# - those got copy pasted, we can probably make them cleaner
# - tests are lacking useful messages
@@ -157,7 +157,7 @@ class MagicVariableTest extends MediaWikiTestCase {
$this->assertUnPadded( 'revisionmonth1', $month );
}
- ############### HELPERS ############################################
+ # ############## HELPERS ############################################
/** assertion helper expecting a magic output which is zero padded */
public function assertZeroPadded( $magic, $value ) {
@@ -189,7 +189,7 @@ class MagicVariableTest extends MediaWikiTestCase {
);
# please keep the following commented line of code. It helps debugging.
- //print "\nDEBUG (value $value):" . sprintf( '2010%02d%02d123456', $value, $value ) . "\n";
+ // print "\nDEBUG (value $value):" . sprintf( '2010%02d%02d123456', $value, $value ) . "\n";
# format expectation and test it
$expected = sprintf( $format, $value );
diff --git a/tests/phpunit/includes/parser/NewParserTest.php b/tests/phpunit/includes/parser/NewParserTest.php
index df7da98c628d..ff4a5271f2ea 100644
--- a/tests/phpunit/includes/parser/NewParserTest.php
+++ b/tests/phpunit/includes/parser/NewParserTest.php
@@ -27,7 +27,7 @@ class NewParserTest extends MediaWikiTestCase {
public $functionHooks = array();
public $transparentHooks = array();
- //Fuzz test
+ // Fuzz test
public $maxFuzzTestLength = 300;
public $fuzzSeed = 0;
public $memoryLimit = 50;
@@ -54,7 +54,7 @@ class NewParserTest extends MediaWikiTestCase {
parent::setUp();
- //Setup CLI arguments
+ // Setup CLI arguments
if ( $this->getCliArg( 'regex' ) ) {
$this->regex = $this->getCliArg( 'regex' );
} else {
@@ -210,7 +210,7 @@ class NewParserTest extends MediaWikiTestCase {
function addDBData() {
$this->tablesUsed[] = 'site_stats';
# disabled for performance
- #$this->tablesUsed[] = 'image';
+ # $this->tablesUsed[] = 'image';
# Update certain things in site_stats
$this->db->insert( 'site_stats',
@@ -346,7 +346,7 @@ class NewParserTest extends MediaWikiTestCase {
}
}
- //ParserTest setup/teardown functions
+ // ParserTest setup/teardown functions
/**
* Set up the global variables for a consistent environment for each test.
@@ -426,7 +426,7 @@ class NewParserTest extends MediaWikiTestCase {
foreach ( $configLines as $line ) {
list( $var, $value ) = explode( '=', $line, 2 );
- $settings[$var] = eval( "return $value;" ); //???
+ $settings[$var] = eval( "return $value;" ); // ???
}
}
@@ -682,7 +682,7 @@ class NewParserTest extends MediaWikiTestCase {
public function testParserTest( $desc, $input, $result, $opts, $config ) {
if ( $this->regex != '' && !preg_match( '/' . $this->regex . '/', $desc ) ) {
$this->assertTrue( true ); // XXX: don't flood output with "test made no assertions"
- //$this->markTestSkipped( 'Filtered out by the user' );
+ // $this->markTestSkipped( 'Filtered out by the user' );
return;
}
@@ -865,7 +865,7 @@ class NewParserTest extends MediaWikiTestCase {
if ( $id % 100 == 0 ) {
$usage = intval( memory_get_usage( true ) / $this->memoryLimit / 1048576 * 100 );
- //echo "{$this->fuzzSeed}: $numSuccess/$numTotal (mem: $usage%)\n";
+ // echo "{$this->fuzzSeed}: $numSuccess/$numTotal (mem: $usage%)\n";
if ( $usage > 90 ) {
$ret = "Out of memory:\n";
$memStats = $this->getMemoryBreakdown();
@@ -882,7 +882,7 @@ class NewParserTest extends MediaWikiTestCase {
}
}
- //Various getter functions
+ // Various getter functions
/**
* Get an input dictionary from a set of parser test files
@@ -956,7 +956,7 @@ class NewParserTest extends MediaWikiTestCase {
return $parser;
}
- //Various action functions
+ // Various action functions
public function addArticle( $name, $text, $line ) {
self::$articles[$name] = array( $text, $line );
@@ -999,7 +999,7 @@ class NewParserTest extends MediaWikiTestCase {
return isset( $wgParser->mTransparentTagHooks[$name] );
}
- //Various "cleanup" functions
+ // Various "cleanup" functions
/**
* Remove last character if it is a newline
@@ -1014,7 +1014,7 @@ class NewParserTest extends MediaWikiTestCase {
}
}
- //Test options parser functions
+ // Test options parser functions
protected function parseOptions( $instring ) {
$opts = array();