global $wgParserConf, $wgContLang;
parent::setUp();
$this->mOptions = ParserOptions::newFromUserAndLang( new User, $wgContLang );
- $name = isset( $wgParserConf['preprocessorClass'] ) ? $wgParserConf['preprocessorClass'] : 'Preprocessor_DOM';
+ $name = isset( $wgParserConf['preprocessorClass'] )
+ ? $wgParserConf['preprocessorClass']
+ : 'Preprocessor_DOM';
$this->mPreprocessor = new $name( $this );
}
}
public static function provideCases() {
+ // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
return array(
array( "Foo", "<root>Foo</root>" ),
array( "<!-- Foo -->", "<root><comment><!-- Foo --></comment></root>" ),
array( "{{Foo|} Bar=}}", "<root><template><title>Foo</title><part><name>} Bar</name>=<value></value></part></template></root>" ),
/* array( file_get_contents( __DIR__ . '/QuoteQuran.txt' ), file_get_contents( __DIR__ . '/QuoteQuranExpanded.txt' ) ), */
);
+ // @codingStandardsIgnoreEnd
}
/**
* These are more complex test cases taken out of wiki articles.
*/
public static function provideFiles() {
+ // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
return array(
array( "QuoteQuran" ), # http://en.wikipedia.org/w/index.php?title=Template:QuoteQuran/sandbox&oldid=237348988 GFDL + CC BY-SA by Striver
array( "Factorial" ), # http://en.wikipedia.org/w/index.php?title=Template:Factorial&oldid=98548758 GFDL + CC BY-SA by Polonium
array( "Fundraising" ), # http://tl.wiktionary.org/w/index.php?title=MediaWiki:Sitenotice&oldid=5716 GFDL + CC BY-SA, copied there by Sky Harbor.
array( "NestedTemplates" ), # bug 27936
);
+ // @codingStandardsIgnoreEnd
}
/**
}
/**
- * Tests from Bug 28642 · https://bugzilla.wikimedia.org/28642
+ * Tests from T30642 · https://phabricator.wikimedia.org/T30642
*/
public static function provideHeadings() {
+ // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
return array( /* These should become headings: */
array( "== h ==<!--c1-->", "<root><h level=\"2\" i=\"1\">== h ==<comment><!--c1--></comment></h></root>" ),
array( "== h == <!--c1-->", "<root><h level=\"2\" i=\"1\">== h == <comment><!--c1--></comment></h></root>" ),
array( "== h ==<!--c1--> x <!--c2--><!--c3--> ", "<root>== h ==<comment><!--c1--></comment> x <comment><!--c2--></comment><comment><!--c3--></comment> </root>" ),
array( "== h ==<!--c1--><!--c2--><!--c3--> x ", "<root>== h ==<comment><!--c1--></comment><comment><!--c2--></comment><comment><!--c3--></comment> x </root>" ),
);
+ // @codingStandardsIgnoreEnd
}
/**