From: Ævar Arnfjörð Bjarmason Date: Mon, 19 Sep 2005 13:09:28 +0000 (+0000) Subject: * Adding a basic extension for testing extensions in the parser tests X-Git-Tag: 1.6.0~1605 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=1d2982addcb94dbd10471a995119a5d7fcce9773;p=lhc%2Fweb%2Fwiklou.git * Adding a basic extension for testing extensions in the parser tests --- diff --git a/maintenance/parserTestsParserHook.php b/maintenance/parserTestsParserHook.php new file mode 100644 index 0000000000..cb15614566 --- /dev/null +++ b/maintenance/parserTestsParserHook.php @@ -0,0 +1,25 @@ + + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + */ + +$wgHooks['ParserTestParser'][] = 'wfParserSetup'; + +function wfParserSetup( &$parser ) { + $parser->setHook( 'tag', 'wfParserHook' ); +} + +function wfParserHook( $in, $argv ) { + if ( count( $argv ) ) + return "
\n" . print_r( $argv, true ) . '
'; + else + return $in; +}