Rewrite various TableCleanup scripts to subclass Maintenance instead of FiveUpgrade
[mediawiki.git] / maintenance / parserTestsParserHook.php
blobf55cd0e4d761fc2f3afcc8e1d64d1e46acb5eca7
1 <?php
2 if ( ! defined( 'MEDIAWIKI' ) )
3 die( -1 );
4 /**
5 * A basic extension that's used by the parser tests to test whether input and
6 * arguments are passed to extensions properly.
8 * @file
9 * @ingroup Maintenance
11 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
12 * @copyright Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason
13 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
16 $wgHooks['ParserTestParser'][] = 'wfParserTestParserHookSetup';
18 function wfParserTestParserHookSetup( &$parser ) {
19 $parser->setHook( 'tag', 'wfParserTestParserHookHook' );
21 return true;
24 function wfParserTestParserHookHook( $in, $argv ) {
25 ob_start();
26 var_dump(
27 $in,
28 $argv
30 $ret = ob_get_clean();
32 return "<pre>\n$ret</pre>";