Skip to content

Commit 34dd84d

Browse files
authored
Merge pull request #138 from Stevemoretz/patch-1
revert match process in JsonDriver
2 parents 9db5401 + 6cec04f commit 34dd84d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Drivers/JsonDriver.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public function extension(): string
2828

2929
public function match($expected, $actual)
3030
{
31-
if (is_array($actual)) {
32-
$actual = json_encode($actual, JSON_PRETTY_PRINT)."\n";
31+
if(is_string($actual)){
32+
$actual = json_decode($actual, true, 512, JSON_THROW_ON_ERROR);
3333
}
34-
35-
Assert::assertJsonStringEqualsJsonString($expected, $actual);
34+
$expected = json_decode($expected, true, 512, JSON_THROW_ON_ERROR);
35+
Assert::assertEquals($expected, $actual);
3636
}
3737
}

0 commit comments

Comments
 (0)