Skip to content

Commit 6cec04f

Browse files
authored
Update JsonDriver.php
1 parent 66a8782 commit 6cec04f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Drivers/JsonDriver.php

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

2929
public function match($expected, $actual)
3030
{
31-
$expected = json_decode($expected, true);
31+
if(is_string($actual)){
32+
$actual = json_decode($actual, true, 512, JSON_THROW_ON_ERROR);
33+
}
34+
$expected = json_decode($expected, true, 512, JSON_THROW_ON_ERROR);
3235
Assert::assertEquals($expected, $actual);
3336
}
3437
}

0 commit comments

Comments
 (0)