X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2FtestHelpers.inc;h=16f458bfe6fa94e9e855cb44a5d1d94b1abaecbd;hb=59ebff658ce912c1b0e7ef8d8f9bfec5a4e17b39;hp=bc02d0f1d80790f5ba0eb3bef0cc348ed5d54a80;hpb=d71ce5ab3ae1fae925d42cac4896960538a3d14b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/testHelpers.inc b/tests/testHelpers.inc index bc02d0f1d8..16f458bfe6 100644 --- a/tests/testHelpers.inc +++ b/tests/testHelpers.inc @@ -471,7 +471,7 @@ class TestFileIterator implements Iterator { $hooksResult = $this->delayedParserTest->unleash( $this->parserTest ); if ( !$hooksResult ) { # Some hook reported an issue. Abort. - throw new MWException( "Problem running hook" ); + throw new MWException( "Problem running requested parser hook from the test file" ); } $this->test = array( @@ -618,6 +618,7 @@ class TestFileIterator implements Iterator { * @param bool $fatal True iff an exception should be thrown if * the section is not found. * @return bool|string + * @throws MWException */ private function checkSection( $tokens, $fatal = true ) { if ( is_null( $this->section ) ) { @@ -691,9 +692,10 @@ class DelayedParserTest { * Should be the case if we found the parserTest is not disabled * @param ParserTest|NewParserTest $parserTest * @return bool + * @throws MWException */ public function unleash( &$parserTest ) { - if ( !( $parserTest instanceof ParserTest || $parserTest instanceof NewParserTest ) ) { + if ( !( $parserTest instanceof ParserTest || $parserTest instanceof NewParserTest ) ) { throw new MWException( __METHOD__ . " must be passed an instance of ParserTest or " . "NewParserTest classes\n" ); }