Skip to content

Commit 17af070

Browse files
committed
use Json\decode function
Signed-off-by: Tonko Mulder <[email protected]>
1 parent ddb903e commit 17af070

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Tempest/Framework/Testing/Http/TestResponseHelper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Tempest\Http\Responses\Invalid;
1414
use Tempest\Http\Session\Session;
1515
use Tempest\Http\Status;
16+
use Tempest\Support\Json;
1617
use Tempest\Validation\Rule;
1718
use Tempest\View\View;
1819
use Tempest\View\ViewRenderer;
@@ -262,7 +263,7 @@ public function assertHasJsonValidationError(string $key, ?Closure $test = null)
262263

263264
$validationErrors = array_map(function ($failingRules) use ($key) {
264265
try {
265-
$errors = json_decode($failingRules, true, 512, JSON_THROW_ON_ERROR);
266+
$errors = Json\decode($failingRules);
266267
} catch (JsonException) {
267268
$errors = [];
268269
}

0 commit comments

Comments
 (0)