From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- tests/parser/parserTestsParserHook.php | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 tests/parser/parserTestsParserHook.php (limited to 'tests/parser/parserTestsParserHook.php') diff --git a/tests/parser/parserTestsParserHook.php b/tests/parser/parserTestsParserHook.php deleted file mode 100644 index 24d852c5..00000000 --- a/tests/parser/parserTestsParserHook.php +++ /dev/null @@ -1,70 +0,0 @@ - - */ - -class ParserTestParserHook { - - static function setup( &$parser ) { - $parser->setHook( 'tag', array( __CLASS__, 'dumpHook' ) ); - $parser->setHook( 'statictag', array( __CLASS__, 'staticTagHook' ) ); - return true; - } - - static function dumpHook( $in, $argv ) { - ob_start(); - var_dump( - $in, - $argv - ); - $ret = ob_get_clean(); - - return "
\n$ret
"; - } - - static function staticTagHook( $in, $argv, $parser ) { - if ( ! count( $argv ) ) { - $parser->static_tag_buf = $in; - return ''; - } elseif ( count( $argv ) === 1 && isset( $argv['action'] ) - && $argv['action'] === 'flush' && $in === null ) - { - // Clear the buffer, we probably don't need to - if ( isset( $parser->static_tag_buf ) ) { - $tmp = $parser->static_tag_buf; - } else { - $tmp = ''; - } - $parser->static_tag_buf = null; - return $tmp; - } else - // wtf? - return - "\nCall this extension as string or as" . - " , not in any other way.\n" . - "text: " . var_export( $in, true ) . "\n" . - "argv: " . var_export( $argv, true ) . "\n"; - } -} -- cgit v1.2.2