Expand error message when parser tests found no hook
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 27 Nov 2014 20:12:58 +0000 (21:12 +0100)
committerHashar <hashar@free.fr>
Mon, 5 Jan 2015 13:21:43 +0000 (13:21 +0000)
The existing message is hard to understand and does not mention, that
this is a problem in the parser test itself and not with phpunit.

Before:
1) Warning
The data provider specified for ParserTest_<file>::testParserTest is
invalid.
Problem running hook

After:
1) Warning
The data provider specified for ParserTest_<file>::testParser
Problem running requested parser hook from the test file

Change-Id: I0b4225cc9ab95e8dd048515315c789113dacf39e

tests/testHelpers.inc

index acfdac8..6d3ac2f 100644 (file)
@@ -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(