{"action":"closed","number":20,"pull_request":{"url":"https://api.github.com/repos/webmozart/assert/pulls/20","id":87841492,"html_url":"https://github.com/webmozart/assert/pull/20","diff_url":"https://github.com/webmozart/assert/pull/20.diff","patch_url":"https://github.com/webmozart/assert/pull/20.patch","issue_url":"https://api.github.com/repos/webmozart/assert/issues/20","number":20,"state":"closed","locked":false,"title":"[RFC] add throws assertion","user":{"login":"docteurklein","id":109846,"avatar_url":"https://avatars.githubusercontent.com/u/109846?v=3","gravatar_id":"","url":"https://api.github.com/users/docteurklein","html_url":"https://github.com/docteurklein","followers_url":"https://api.github.com/users/docteurklein/followers","following_url":"https://api.github.com/users/docteurklein/following{/other_user}","gists_url":"https://api.github.com/users/docteurklein/gists{/gist_id}","starred_url":"https://api.github.com/users/docteurklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docteurklein/subscriptions","organizations_url":"https://api.github.com/users/docteurklein/orgs","repos_url":"https://api.github.com/users/docteurklein/repos","events_url":"https://api.github.com/users/docteurklein/events{/privacy}","received_events_url":"https://api.github.com/users/docteurklein/received_events","type":"User","site_admin":false},"body":"hey there!\n\nI was thinking about the simplest way to assert exceptions are thrown and thought it was currently missing.\n\nDo you think it's a viable solution? If so, I'll add some tests.\n\ncurrent usage:\n\n``` php\nAssert::throws(function() {\n    $this->products->findOrThrow('some-id'), new \\LogicException);\n}, \\LogicException::class);\n```\n\nIt will only check the exception type right now, not comparing the message.\n","created_at":"2016-10-04T06:58:44Z","updated_at":"2016-11-23T19:53:21Z","closed_at":"2016-11-23T19:53:21Z","merged_at":"2016-11-23T19:53:21Z","merge_commit_sha":"5ffa9075117d225e739ce7bfd469c673bbf269bc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/webmozart/assert/pulls/20/commits","review_comments_url":"https://api.github.com/repos/webmozart/assert/pulls/20/comments","review_comment_url":"https://api.github.com/repos/webmozart/assert/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webmozart/assert/issues/20/comments","statuses_url":"https://api.github.com/repos/webmozart/assert/statuses/eefdfa6225b027cfff2e2a2f52e7101b55b05858","head":{"label":"docteurklein:feature/assert-throws","ref":"feature/assert-throws","sha":"eefdfa6225b027cfff2e2a2f52e7101b55b05858","user":{"login":"docteurklein","id":109846,"avatar_url":"https://avatars.githubusercontent.com/u/109846?v=3","gravatar_id":"","url":"https://api.github.com/users/docteurklein","html_url":"https://github.com/docteurklein","followers_url":"https://api.github.com/users/docteurklein/followers","following_url":"https://api.github.com/users/docteurklein/following{/other_user}","gists_url":"https://api.github.com/users/docteurklein/gists{/gist_id}","starred_url":"https://api.github.com/users/docteurklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docteurklein/subscriptions","organizations_url":"https://api.github.com/users/docteurklein/orgs","repos_url":"https://api.github.com/users/docteurklein/repos","events_url":"https://api.github.com/users/docteurklein/events{/privacy}","received_events_url":"https://api.github.com/users/docteurklein/received_events","type":"User","site_admin":false},"repo":{"id":69940684,"name":"assert","full_name":"docteurklein/assert","owner":{"login":"docteurklein","id":109846,"avatar_url":"https://avatars.githubusercontent.com/u/109846?v=3","gravatar_id":"","url":"https://api.github.com/users/docteurklein","html_url":"https://github.com/docteurklein","followers_url":"https://api.github.com/users/docteurklein/followers","following_url":"https://api.github.com/users/docteurklein/following{/other_user}","gists_url":"https://api.github.com/users/docteurklein/gists{/gist_id}","starred_url":"https://api.github.com/users/docteurklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docteurklein/subscriptions","organizations_url":"https://api.github.com/users/docteurklein/orgs","repos_url":"https://api.github.com/users/docteurklein/repos","events_url":"https://api.github.com/users/docteurklein/events{/privacy}","received_events_url":"https://api.github.com/users/docteurklein/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/docteurklein/assert","description":"Assertions to validate method input/output with nice error messages.","fork":true,"url":"https://api.github.com/repos/docteurklein/assert","forks_url":"https://api.github.com/repos/docteurklein/assert/forks","keys_url":"https://api.github.com/repos/docteurklein/assert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docteurklein/assert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docteurklein/assert/teams","hooks_url":"https://api.github.com/repos/docteurklein/assert/hooks","issue_events_url":"https://api.github.com/repos/docteurklein/assert/issues/events{/number}","events_url":"https://api.github.com/repos/docteurklein/assert/events","assignees_url":"https://api.github.com/repos/docteurklein/assert/assignees{/user}","branches_url":"https://api.github.com/repos/docteurklein/assert/branches{/branch}","tags_url":"https://api.github.com/repos/docteurklein/assert/tags","blobs_url":"https://api.github.com/repos/docteurklein/assert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docteurklein/assert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docteurklein/assert/git/refs{/sha}","trees_url":"https://api.github.com/repos/docteurklein/assert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docteurklein/assert/statuses/{sha}","languages_url":"https://api.github.com/repos/docteurklein/assert/languages","stargazers_url":"https://api.github.com/repos/docteurklein/assert/stargazers","contributors_url":"https://api.github.com/repos/docteurklein/assert/contributors","subscribers_url":"https://api.github.com/repos/docteurklein/assert/subscribers","subscription_url":"https://api.github.com/repos/docteurklein/assert/subscription","commits_url":"https://api.github.com/repos/docteurklein/assert/commits{/sha}","git_commits_url":"https://api.github.com/repos/docteurklein/assert/git/commits{/sha}","comments_url":"https://api.github.com/repos/docteurklein/assert/comments{/number}","issue_comment_url":"https://api.github.com/repos/docteurklein/assert/issues/comments{/number}","contents_url":"https://api.github.com/repos/docteurklein/assert/contents/{+path}","compare_url":"https://api.github.com/repos/docteurklein/assert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docteurklein/assert/merges","archive_url":"https://api.github.com/repos/docteurklein/assert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docteurklein/assert/downloads","issues_url":"https://api.github.com/repos/docteurklein/assert/issues{/number}","pulls_url":"https://api.github.com/repos/docteurklein/assert/pulls{/number}","milestones_url":"https://api.github.com/repos/docteurklein/assert/milestones{/number}","notifications_url":"https://api.github.com/repos/docteurklein/assert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docteurklein/assert/labels{/name}","releases_url":"https://api.github.com/repos/docteurklein/assert/releases{/id}","deployments_url":"https://api.github.com/repos/docteurklein/assert/deployments","created_at":"2016-10-04T06:51:52Z","updated_at":"2016-10-04T06:51:52Z","pushed_at":"2016-10-24T13:57:06Z","git_url":"git://github.com/docteurklein/assert.git","ssh_url":"git@github.com:docteurklein/assert.git","clone_url":"https://github.com/docteurklein/assert.git","svn_url":"https://github.com/docteurklein/assert","homepage":"","size":162,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"webmozart:master","ref":"master","sha":"c0c92082a2ffef8fab7941d4f6fd6a6a72ed627c","user":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"repo":{"id":32015820,"name":"assert","full_name":"webmozart/assert","owner":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/webmozart/assert","description":"Assertions to validate method input/output with nice error messages.","fork":false,"url":"https://api.github.com/repos/webmozart/assert","forks_url":"https://api.github.com/repos/webmozart/assert/forks","keys_url":"https://api.github.com/repos/webmozart/assert/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webmozart/assert/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webmozart/assert/teams","hooks_url":"https://api.github.com/repos/webmozart/assert/hooks","issue_events_url":"https://api.github.com/repos/webmozart/assert/issues/events{/number}","events_url":"https://api.github.com/repos/webmozart/assert/events","assignees_url":"https://api.github.com/repos/webmozart/assert/assignees{/user}","branches_url":"https://api.github.com/repos/webmozart/assert/branches{/branch}","tags_url":"https://api.github.com/repos/webmozart/assert/tags","blobs_url":"https://api.github.com/repos/webmozart/assert/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webmozart/assert/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webmozart/assert/git/refs{/sha}","trees_url":"https://api.github.com/repos/webmozart/assert/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webmozart/assert/statuses/{sha}","languages_url":"https://api.github.com/repos/webmozart/assert/languages","stargazers_url":"https://api.github.com/repos/webmozart/assert/stargazers","contributors_url":"https://api.github.com/repos/webmozart/assert/contributors","subscribers_url":"https://api.github.com/repos/webmozart/assert/subscribers","subscription_url":"https://api.github.com/repos/webmozart/assert/subscription","commits_url":"https://api.github.com/repos/webmozart/assert/commits{/sha}","git_commits_url":"https://api.github.com/repos/webmozart/assert/git/commits{/sha}","comments_url":"https://api.github.com/repos/webmozart/assert/comments{/number}","issue_comment_url":"https://api.github.com/repos/webmozart/assert/issues/comments{/number}","contents_url":"https://api.github.com/repos/webmozart/assert/contents/{+path}","compare_url":"https://api.github.com/repos/webmozart/assert/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webmozart/assert/merges","archive_url":"https://api.github.com/repos/webmozart/assert/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webmozart/assert/downloads","issues_url":"https://api.github.com/repos/webmozart/assert/issues{/number}","pulls_url":"https://api.github.com/repos/webmozart/assert/pulls{/number}","milestones_url":"https://api.github.com/repos/webmozart/assert/milestones{/number}","notifications_url":"https://api.github.com/repos/webmozart/assert/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webmozart/assert/labels{/name}","releases_url":"https://api.github.com/repos/webmozart/assert/releases{/id}","deployments_url":"https://api.github.com/repos/webmozart/assert/deployments","created_at":"2015-03-11T12:14:36Z","updated_at":"2016-11-18T15:26:57Z","pushed_at":"2016-11-23T19:53:21Z","git_url":"git://github.com/webmozart/assert.git","ssh_url":"git@github.com:webmozart/assert.git","clone_url":"https://github.com/webmozart/assert.git","svn_url":"https://github.com/webmozart/assert","homepage":"","size":180,"stargazers_count":147,"watchers_count":147,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":4,"forks":15,"open_issues":4,"watchers":147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webmozart/assert/pulls/20"},"html":{"href":"https://github.com/webmozart/assert/pull/20"},"issue":{"href":"https://api.github.com/repos/webmozart/assert/issues/20"},"comments":{"href":"https://api.github.com/repos/webmozart/assert/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/webmozart/assert/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/webmozart/assert/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webmozart/assert/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/webmozart/assert/statuses/eefdfa6225b027cfff2e2a2f52e7101b55b05858"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"webmozart","id":176399,"avatar_url":"https://avatars.githubusercontent.com/u/176399?v=3","gravatar_id":"","url":"https://api.github.com/users/webmozart","html_url":"https://github.com/webmozart","followers_url":"https://api.github.com/users/webmozart/followers","following_url":"https://api.github.com/users/webmozart/following{/other_user}","gists_url":"https://api.github.com/users/webmozart/gists{/gist_id}","starred_url":"https://api.github.com/users/webmozart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webmozart/subscriptions","organizations_url":"https://api.github.com/users/webmozart/orgs","repos_url":"https://api.github.com/users/webmozart/repos","events_url":"https://api.github.com/users/webmozart/events{/privacy}","received_events_url":"https://api.github.com/users/webmozart/received_events","type":"User","site_admin":false},"comments":33,"review_comments":53,"commits":1,"additions":61,"deletions":5,"changed_files":2}}
{"actor":{"display_login":"webmozart"}}