$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
/**
* @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() {
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' ),