MediaWiki  1.23.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...
 
 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...
 

Detailed Description

A class to delay execution of a parser test hooks.

Definition at line 599 of file testHelpers.inc.

Constructor & Destructor Documentation

◆ __construct()

DelayedParserTest::__construct ( )

Definition at line 605 of file testHelpers.inc.

References reset().

Member Function Documentation

◆ requireFunctionHook()

DelayedParserTest::requireFunctionHook (   $fnHook)

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

Definition at line 659 of file testHelpers.inc.

◆ requireHook()

DelayedParserTest::requireHook (   $hook)

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

Definition at line 651 of file testHelpers.inc.

References hooks.

◆ reset()

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 613 of file testHelpers.inc.

References array(), and hooks.

Referenced by __construct().

◆ unleash()

DelayedParserTest::unleash ( $parserTest)

Called whenever we actually want to run the hook.

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

Definition at line 622 of file testHelpers.inc.

References $ret, as, and hooks.

Member Data Documentation

◆ $fnHooks

DelayedParserTest::$fnHooks
private

Definition at line 603 of file testHelpers.inc.

◆ $hooks

DelayedParserTest::$hooks
private

Initialized on construction.

Definition at line 602 of file testHelpers.inc.


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