{"action":"closed","issue":{"url":"https://api.github.com/repos/async-interop/event-loop/issues/29","repository_url":"https://api.github.com/repos/async-interop/event-loop","labels_url":"https://api.github.com/repos/async-interop/event-loop/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/async-interop/event-loop/issues/29/comments","events_url":"https://api.github.com/repos/async-interop/event-loop/issues/29/events","html_url":"https://github.com/async-interop/event-loop/issues/29","id":154546168,"number":29,"title":"Loop::execute and coroutines / testing","user":{"login":"kelunik","id":2743004,"avatar_url":"https://avatars.githubusercontent.com/u/2743004?v=3","gravatar_id":"","url":"https://api.github.com/users/kelunik","html_url":"https://github.com/kelunik","followers_url":"https://api.github.com/users/kelunik/followers","following_url":"https://api.github.com/users/kelunik/following{/other_user}","gists_url":"https://api.github.com/users/kelunik/gists{/gist_id}","starred_url":"https://api.github.com/users/kelunik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kelunik/subscriptions","organizations_url":"https://api.github.com/users/kelunik/orgs","repos_url":"https://api.github.com/users/kelunik/repos","events_url":"https://api.github.com/users/kelunik/events{/privacy}","received_events_url":"https://api.github.com/users/kelunik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/async-interop/event-loop/labels/discussion","name":"discussion","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-12T18:10:16Z","updated_at":"2016-05-18T08:42:54Z","closed_at":"2016-05-18T08:42:54Z","body":"We currently aren't coupled to any promise / coroutine / whatever API. This means that we can't use coroutines as an argument to `Loop::execute`. It might be possible to achieve it using something like `Amp\\coroutine`.\r\n\r\nMy actual question is: How are we going to write tests? Using the an emulated `Loop::wait` / a decoupled `wait` function? The reason is that we need the thing that executes to throw exceptions thrown inside the callable to outside of the callable, so we can use things like PHPUnit's `@expectedException`."}}