Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73986


Change subject: Code style cleanups to parserTest.inc and NewParserTest.php.
......................................................................

Code style cleanups to parserTest.inc and NewParserTest.php.

Break some long lines which were causing WARNINGs and ERRORs from the
PHP code style checker.

Change-Id: Id52e18119277030041786d0130e693289b3c519e
---
M tests/parser/parserTest.inc
M tests/phpunit/includes/parser/NewParserTest.php
2 files changed, 14 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/73986/1

diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 0469138..0634657 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -885,7 +885,8 @@
                }
 
                # Update certain things in site_stats
-               $this->db->insert( 'site_stats', array( 'ss_row_id' => 1, 
'ss_images' => 2, 'ss_good_articles' => 1 ) );
+               $this->db->insert( 'site_stats',
+                       array( 'ss_row_id' => 1, 'ss_images' => 2, 
'ss_good_articles' => 1 ) );
 
                # Reinitialise the LocalisationCache to match the database state
                Language::getLocalisationCache()->unloadAll();
@@ -982,7 +983,8 @@
                $tables = $this->listTables();
 
                foreach ( $tables as $table ) {
-                       $sql = $this->db->getType() == 'oracle' ? "DROP TABLE 
pt_$table DROP CONSTRAINTS" : "DROP TABLE `parsertest_$table`";
+                       $sql = $this->db->getType() == 'oracle' ?
+                               "DROP TABLE pt_$table DROP CONSTRAINTS" : "DROP 
TABLE `parsertest_$table`";
                        $this->db->query( $sql );
                }
 
@@ -1210,7 +1212,8 @@
         * @param $outFileTail String: tailing for the output file name
         * @return String
         */
-       protected function quickDiff( $input, $output, $inFileTail = 
'expected', $outFileTail = 'actual' ) {
+       protected function quickDiff( $input, $output,
+               $inFileTail = 'expected', $outFileTail = 'actual' ) {
                # Windows, or at least the fc utility, is retarded
                $slash = wfIsWindows() ? '\\' : '/';
                $prefix = wfTempDir() . "{$slash}mwParser-" . mt_rand();
diff --git a/tests/phpunit/includes/parser/NewParserTest.php 
b/tests/phpunit/includes/parser/NewParserTest.php
index 9551b2f..89103a2 100644
--- a/tests/phpunit/includes/parser/NewParserTest.php
+++ b/tests/phpunit/includes/parser/NewParserTest.php
@@ -105,11 +105,14 @@
                ) );
                $tmpGlobals['wgNamespaceProtection'] = array( NS_MEDIAWIKI => 
'editinterface' );
 
-               $tmpGlobals['wgParser'] = new StubObject( 'wgParser', 
$GLOBALS['wgParserConf']['class'], array( $GLOBALS['wgParserConf'] ) );
+               $tmpGlobals['wgParser'] = new StubObject(
+                       'wgParser', $GLOBALS['wgParserConf']['class'],
+                       array( $GLOBALS['wgParserConf'] ) );
 
                $tmpGlobals['wgFileExtensions'][] = 'svg';
                $tmpGlobals['wgSVGConverter'] = 'rsvg';
-               $tmpGlobals['wgSVGConverters']['rsvg'] = '$path/rsvg-convert -w 
$width -h $height $input -o $output';
+               $tmpGlobals['wgSVGConverters']['rsvg'] =
+                       '$path/rsvg-convert -w $width -h $height $input -o 
$output';
 
                if ( $GLOBALS['wgStyleDirectory'] === false ) {
                        $tmpGlobals['wgStyleDirectory'] = "$IP/skins";
@@ -698,7 +701,9 @@
                        } catch ( Exception $exception ) {
                                $input_dump = sprintf( "string(%d) \"%s\"\n", 
strlen( $input ), $input );
 
-                               $this->assertTrue( false, "Test $id, fuzz seed 
{$this->fuzzSeed}. \n\nInput: $input_dump\n\nError: 
{$exception->getMessage()}\n\nBacktrace: {$exception->getTraceAsString()}" );
+                               $this->assertTrue( false, "Test $id, fuzz seed 
{$this->fuzzSeed}. \n\n" .
+                                       "Input: $input_dump\n\nError: 
{$exception->getMessage()}\n\n" .
+                                       "Backtrace: 
{$exception->getTraceAsString()}" );
                        }
 
                        $this->teardownGlobals();

-- 
To view, visit https://gerrit.wikimedia.org/r/73986
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id52e18119277030041786d0130e693289b3c519e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to