json() ->name ->toBe('Nuno'); }); test('fails with broken json string', function (): void { expect('{":"Nuno"}')->json(); })->throws(ExpectationFailedException::class);