From 7ac63ce7683805ceef7397add571f05e0758e13a Mon Sep 17 00:00:00 2001 From: Yannick ROGER Date: Wed, 7 Apr 2021 14:38:17 +0200 Subject: [PATCH] fix(content): Remove flacky json_encode. --- src/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Response.php b/src/Response.php index 3338e51..29bf51c 100644 --- a/src/Response.php +++ b/src/Response.php @@ -192,7 +192,7 @@ public function setContent($content) $this->assertReponseSchema( $this->getFormat(), $this->getSchema(), - \json_encode($content) + $content ); } @@ -301,7 +301,7 @@ public function assertReponseSchema($format, $schema, $value) switch (true) { case strpos($format, 'json') !== false: - $this->assertResponseJSON($value, $schema); + $this->assertResponseJSON(json_encode($value), $schema); break; case strpos($format, 'xml') !== false: $this->assertResponseXML($value, $schema);