{"action":"opened","issue":{"url":"https://api.github.com/repos/inklabs/kommerce-core/issues/23","labels_url":"https://api.github.com/repos/inklabs/kommerce-core/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/inklabs/kommerce-core/issues/23/comments","events_url":"https://api.github.com/repos/inklabs/kommerce-core/issues/23/events","html_url":"https://github.com/inklabs/kommerce-core/issues/23","id":117899182,"number":23,"title":"Remove @expectedException annotations in tests","user":{"login":"pdt256","id":370440,"avatar_url":"https://avatars.githubusercontent.com/u/370440?v=3","gravatar_id":"","url":"https://api.github.com/users/pdt256","html_url":"https://github.com/pdt256","followers_url":"https://api.github.com/users/pdt256/followers","following_url":"https://api.github.com/users/pdt256/following{/other_user}","gists_url":"https://api.github.com/users/pdt256/gists{/gist_id}","starred_url":"https://api.github.com/users/pdt256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdt256/subscriptions","organizations_url":"https://api.github.com/users/pdt256/orgs","repos_url":"https://api.github.com/users/pdt256/repos","events_url":"https://api.github.com/users/pdt256/events{/privacy}","received_events_url":"https://api.github.com/users/pdt256/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-19T20:19:15Z","updated_at":"2015-11-19T20:19:15Z","closed_at":null,"body":"Should explicitly define the expected exception in code.\r\n\r\nExample:\r\n```\r\n        $this->setExpectedException(\r\n            EntityNotFoundException::class,\r\n            'User not found'\r\n        );\r\n```\r\n\r\nThis makes refactoring easier and places the exception at the exact location it should be thrown. With annotations, a premature EntityNotFoundException could trigger the test to pass."}}