MediaWiki  1.27.2
DelayedParserTest Class Reference

A class to delay execution of a parser test hooks. More...

Public Member Functions

 __construct ()
 
 requireFunctionHook ($fnHook)
 Similar to ParserTest object but does not run anything Use unleash() to really execute the hook function. More...
 
 requireHook ($hook)
 Similar to ParserTest object but does not run anything Use unleash() to really execute the hook. More...
 
 requireTransparentHook ($hook)
 Similar to ParserTest object but does not run anything Use unleash() to really execute the hook function. More...
 
 reset ()
 Init/reset or forgot about the current delayed test. More...
 
 unleash (&$parserTest)
 Called whenever we actually want to run the hook. More...
 

Private Attributes

 $fnHooks
 
 $hooks
 Initialized on construction. More...
 
 $transparentHooks
 

Detailed Description

A class to delay execution of a parser test hooks.

Definition at line 709 of file testHelpers.inc.

Constructor & Destructor Documentation

DelayedParserTest::__construct ( )

Definition at line 716 of file testHelpers.inc.

References reset().

Member Function Documentation

DelayedParserTest::requireFunctionHook (   $fnHook)

Similar to ParserTest object but does not run anything Use unleash() to really execute the hook function.

Parameters
string$fnHook

Definition at line 785 of file testHelpers.inc.

DelayedParserTest::requireHook (   $hook)

Similar to ParserTest object but does not run anything Use unleash() to really execute the hook.

Parameters
string$hook

Definition at line 776 of file testHelpers.inc.

References hooks.

DelayedParserTest::requireTransparentHook (   $hook)

Similar to ParserTest object but does not run anything Use unleash() to really execute the hook function.

Parameters
string$hook

Definition at line 794 of file testHelpers.inc.

DelayedParserTest::reset ( )

Init/reset or forgot about the current delayed test.

Call to this will erase any hooks function that were pending.

Definition at line 724 of file testHelpers.inc.

References hooks.

Referenced by __construct().

DelayedParserTest::unleash ( $parserTest)

Called whenever we actually want to run the hook.

Should be the case if we found the parserTest is not disabled

Parameters
ParserTest | NewParserTest$parserTest
Returns
bool
Exceptions
MWException

Definition at line 737 of file testHelpers.inc.

References $ret, as, and hooks.

Member Data Documentation

DelayedParserTest::$fnHooks
private

Definition at line 713 of file testHelpers.inc.

DelayedParserTest::$hooks
private

Initialized on construction.

Definition at line 712 of file testHelpers.inc.

DelayedParserTest::$transparentHooks
private

Definition at line 714 of file testHelpers.inc.


The documentation for this class was generated from the following file: