Index: trunk/phase3/tests/testHelpers.inc |
— | — | @@ -543,7 +543,12 @@ |
544 | 544 | * Called whenever we actually want to run the hook. |
545 | 545 | * Should be the case if we found the parserTest is not disabled |
546 | 546 | */ |
547 | | - public function unleash( ParserTest &$parserTest ) { |
| 547 | + public function unleash( &$parserTest ) { |
| 548 | + if( !($parserTest instanceof ParserTest || $parserTest instanceof NewParserTest |
| 549 | + ) ) { |
| 550 | + throw new MWException( __METHOD__ . " must be passed an instance of ParserTest or NewParserTest classes\n" ); |
| 551 | + } |
| 552 | + |
548 | 553 | # Trigger delayed hooks. Any failure will make us abort |
549 | 554 | foreach( $this->hooks as $hook ) { |
550 | 555 | $ret = $parserTest->requireHook( $hook ); |