From d7f741824339890d2a903852ae2914c92f379cb7 Mon Sep 17 00:00:00 2001 From: Possum Date: Tue, 5 May 2015 18:13:16 +0200 Subject: [PATCH] some more test failure details --- tests/Composer/Test/Json/JsonFileTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Composer/Test/Json/JsonFileTest.php b/tests/Composer/Test/Json/JsonFileTest.php index 46b434ccd..64a621d6c 100644 --- a/tests/Composer/Test/Json/JsonFileTest.php +++ b/tests/Composer/Test/Json/JsonFileTest.php @@ -209,8 +209,8 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase private function expectParseException($text, $json) { try { - JsonFile::parseJson($json); - $this->fail(); + $result = JsonFile::parseJson($json); + $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) { $this->assertContains($text, $e->getMessage()); }