Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

Commit

Permalink
Merge pull request #44 from RETFU/remove-flacky-json-encode
Browse files Browse the repository at this point in the history
fix(content): Remove flacky json_encode.
  • Loading branch information
yannickroger committed Apr 8, 2021
2 parents c595ae6 + 7ac63ce commit 5afeea8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function setContent($content)
$this->assertReponseSchema(
$this->getFormat(),
$this->getSchema(),
\json_encode($content)
$content
);
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 5afeea8

Please sign in to comment.