Merge pull request #4000 from SpacePossum/json_testing
On Json tests failures show more test failure detailspull/4001/head
commit
21e92b869e
|
@ -209,8 +209,8 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
|
||||||
private function expectParseException($text, $json)
|
private function expectParseException($text, $json)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
JsonFile::parseJson($json);
|
$result = JsonFile::parseJson($json);
|
||||||
$this->fail();
|
$this->fail(sprintf("Parsing should have failed but didn't.\nExpected:\n\"%s\"\nFor:\n\"%s\"\nGot:\n\"%s\"", $text, $json, var_export($result, true)));
|
||||||
} catch (ParsingException $e) {
|
} catch (ParsingException $e) {
|
||||||
$this->assertContains($text, $e->getMessage());
|
$this->assertContains($text, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue