Make lines short to pass phpcs in parser tests PHP files
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Wed, 30 Sep 2015 06:08:31 +0000 (09:08 +0300)
committerAmire80 <amir.aharoni@mail.huji.ac.il>
Thu, 1 Oct 2015 19:40:18 +0000 (19:40 +0000)
Bug: T102614
Change-Id: I14a28815af83efd38f04def8eb7d42ef124ab918

tests/phpunit/includes/parser/MediaWikiParserTest.php
tests/phpunit/includes/parser/ParserMethodsTest.php
tests/phpunit/includes/parser/TagHooksTest.php

index 96ae3be..95822ad 100644 (file)
@@ -94,9 +94,12 @@ class MediaWikiParserTest {
                        $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
index af143ca..bf0eb10 100644 (file)
@@ -71,7 +71,8 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
 
        /**
         * @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() {
index 4af3898..672b1d4 100644 (file)
@@ -84,7 +84,11 @@ class TagHookTest extends MediaWikiTestCase {
                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' ),