Don't skip tests if the hook is not present

This just hides the error if something's broken with extension
registration because skipped tests don't result in a failed suite.
Instead, explode in everybody's eyes to make it clear there's a
problem.

Change-Id: I2f1e80a1fa4b99d857671c9d1061d34449764f01
This commit is contained in:
Max Semenik 2017-11-14 13:51:50 -08:00
parent 2db83c5d07
commit dbdd8dbc85

View file

@ -165,7 +165,7 @@ class TemplateStylesHooksTest extends MediaWikiLangTestCase {
/** @var Parser $parser */
$parser->firstCallInit();
if ( !isset( $parser->mTagHooks['templatestyles'] ) ) {
$this->markTestSkipped( 'templatestyles tag hook is not in the parser' );
throw new Exception( 'templatestyles tag hook is not in the parser' );
}
$out = $parser->parse( $wikitext, Title::newFromText( 'Test' ), $popt );
$parser->mPreprocessor = null; # Break the Parser <-> Preprocessor cycle