{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/17700","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/17700/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/17700/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/17700/events","html_url":"https://github.com/laravel/framework/pull/17700","id":204424952,"number":17700,"title":"[5.4] Add assertJsonStructure method to TestResponse","user":{"login":"cretueusebiu","id":1517945,"avatar_url":"https://avatars3.githubusercontent.com/u/1517945?v=3","gravatar_id":"","url":"https://api.github.com/users/cretueusebiu","html_url":"https://github.com/cretueusebiu","followers_url":"https://api.github.com/users/cretueusebiu/followers","following_url":"https://api.github.com/users/cretueusebiu/following{/other_user}","gists_url":"https://api.github.com/users/cretueusebiu/gists{/gist_id}","starred_url":"https://api.github.com/users/cretueusebiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cretueusebiu/subscriptions","organizations_url":"https://api.github.com/users/cretueusebiu/orgs","repos_url":"https://api.github.com/users/cretueusebiu/repos","events_url":"https://api.github.com/users/cretueusebiu/events{/privacy}","received_events_url":"https://api.github.com/users/cretueusebiu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-31T21:13:15Z","updated_at":"2017-03-10T11:20:05Z","closed_at":"2017-02-01T16:51:52Z","pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/17700","html_url":"https://github.com/laravel/framework/pull/17700","diff_url":"https://github.com/laravel/framework/pull/17700.diff","patch_url":"https://github.com/laravel/framework/pull/17700.patch"},"body":"Adds `TestResponse::assertJsonStructure`."},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/285644738","html_url":"https://github.com/laravel/framework/pull/17700#issuecomment-285644738","issue_url":"https://api.github.com/repos/laravel/framework/issues/17700","id":285644738,"user":{"login":"cretueusebiu","id":1517945,"avatar_url":"https://avatars3.githubusercontent.com/u/1517945?v=3","gravatar_id":"","url":"https://api.github.com/users/cretueusebiu","html_url":"https://github.com/cretueusebiu","followers_url":"https://api.github.com/users/cretueusebiu/followers","following_url":"https://api.github.com/users/cretueusebiu/following{/other_user}","gists_url":"https://api.github.com/users/cretueusebiu/gists{/gist_id}","starred_url":"https://api.github.com/users/cretueusebiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cretueusebiu/subscriptions","organizations_url":"https://api.github.com/users/cretueusebiu/orgs","repos_url":"https://api.github.com/users/cretueusebiu/repos","events_url":"https://api.github.com/users/cretueusebiu/events{/privacy}","received_events_url":"https://api.github.com/users/cretueusebiu/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T11:20:05Z","updated_at":"2017-03-10T11:20:05Z","body":"Try this then:\r\n\r\n```php\r\nTestResponse::macro('assertExactJsonStructure', function ($expected) {\r\n    $actual = json_encode(Arr::sortRecursive(array_keys($this->json())));\r\n\r\n    TestCase::assertEquals(json_encode(Arr::sortRecursive($expected)), array_keys($actual));\r\n});\r\n```"}}
{"actor":{"display_login":"cretueusebiu"}}