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