Skip to content

Commit

Permalink
[TEST] return second level of exception message if possible, for furt…
Browse files Browse the repository at this point in the history
…her testing
  • Loading branch information
polyfractal committed Mar 31, 2016
1 parent 496071c commit a76cbf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Elasticsearch/Tests/YamlRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,9 @@ private function handleCaughtException(\Exception $exception, $expectedError) {

if ($passed === true) {
$this->assertTrue(true);
if ($exception->getPrevious() !== null) {
return json_decode($exception->getPrevious()->getMessage(), true);
}
return json_decode($exception->getMessage(), true);
}

Expand Down

0 comments on commit a76cbf2

Please sign in to comment.