jenkins-bot has submitted this change and it was merged.

Change subject: Make lines short to pass phpcs in parser tests PHP files
......................................................................


Make lines short to pass phpcs in parser tests PHP files

Bug: T102614
Change-Id: I14a28815af83efd38f04def8eb7d42ef124ab918
---
M tests/phpunit/includes/parser/MediaWikiParserTest.php
M tests/phpunit/includes/parser/ParserMethodsTest.php
M tests/phpunit/includes/parser/TagHooksTest.php
3 files changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/includes/parser/MediaWikiParserTest.php 
b/tests/phpunit/includes/parser/MediaWikiParserTest.php
index 96ae3be..95822ad 100644
--- a/tests/phpunit/includes/parser/MediaWikiParserTest.php
+++ b/tests/phpunit/includes/parser/MediaWikiParserTest.php
@@ -94,9 +94,12 @@
                        $testsName = $extensionName . '__' . basename( 
$fileName, '.txt' );
                        $escapedFileName = strtr( $fileName, array( "'" => 
"\\'", '\\' => '\\\\' ) );
                        $parserTestClassName = ucfirst( $testsName );
+
                        // Official spec for class names: 
http://php.net/manual/en/language.oop5.basic.php
                        // Prepend 'ParserTest_' to be paranoid about it not 
starting with a number
-                       $parserTestClassName = 'ParserTest_' . preg_replace( 
'/[^a-zA-Z0-9_\x7f-\xff]/', '_', $parserTestClassName );
+                       $parserTestClassName = 'ParserTest_' .
+                               preg_replace( '/[^a-zA-Z0-9_\x7f-\xff]/', '_', 
$parserTestClassName );
+
                        if ( isset( $testList[$parserTestClassName] ) ) {
                                // If a conflict happens, gives a very unclear 
fatal.
                                // So as a last ditch effort to prevent that 
eventuality, if there
diff --git a/tests/phpunit/includes/parser/ParserMethodsTest.php 
b/tests/phpunit/includes/parser/ParserMethodsTest.php
index af143ca..bf0eb10 100644
--- a/tests/phpunit/includes/parser/ParserMethodsTest.php
+++ b/tests/phpunit/includes/parser/ParserMethodsTest.php
@@ -71,7 +71,8 @@
 
        /**
         * @expectedException MWException
-        * @expectedExceptionMessage Parser state cleared while parsing. Did 
you call Parser::parse recursively?
+        * @expectedExceptionMessage Parser state cleared while parsing.
+        *  Did you call Parser::parse recursively?
         * @covers Parser::lock
         */
        public function testRecursiveParse() {
diff --git a/tests/phpunit/includes/parser/TagHooksTest.php 
b/tests/phpunit/includes/parser/TagHooksTest.php
index 4af3898..672b1d4 100644
--- a/tests/phpunit/includes/parser/TagHooksTest.php
+++ b/tests/phpunit/includes/parser/TagHooksTest.php
@@ -84,7 +84,11 @@
                global $wgParserConf, $wgContLang;
                $parser = new Parser( $wgParserConf );
 
-               $parser->setFunctionTagHook( $tag, array( $this, 
'functionTagCallback' ), Parser::SFH_OBJECT_ARGS );
+               $parser->setFunctionTagHook(
+                       $tag,
+                       array( $this, 'functionTagCallback' ),
+                       Parser::SFH_OBJECT_ARGS
+               );
                $parser->parse(
                        "Foo<$tag>Bar</$tag>Baz",
                        Title::newFromText( 'Test' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14a28815af83efd38f04def8eb7d42ef124ab918
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>
Gerrit-Reviewer: Jackmcbarn <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to