{"action":"created","issue":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/605","labels_url":"https://api.github.com/repos/phpspec/phpspec/issues/605/labels{/name}","comments_url":"https://api.github.com/repos/phpspec/phpspec/issues/605/comments","events_url":"https://api.github.com/repos/phpspec/phpspec/issues/605/events","html_url":"https://github.com/phpspec/phpspec/issues/605","id":54002378,"number":605,"title":"Need a way to skip examples entirely","user":{"login":"ciaranmcnulty","id":237866,"avatar_url":"https://avatars.githubusercontent.com/u/237866?v=3","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phpspec/phpspec/labels/refactoring","name":"refactoring","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-11T19:48:37Z","updated_at":"2015-01-12T11:06:13Z","closed_at":null,"body":"I found myself needing to skip an example entirely, because the collaborators are not available on different environments: https://github.com/ciaranmcnulty/phpspec/blob/refactor/support-questionhelper/src/PhpSpec/Console/Prompter/Question.php\r\n\r\nThe skipping was simple thanks to @gquemener's work in this area, but the problem is that it's then not possible to type hint the collaborator in the normal way.\r\n\r\nWhat would be great would be a way to indicate that an entire example can be completely skipped at the Locator level. Whether that's via Annotations, config, some sort of programmatic way (like `MatcherProviderInterface`)"},"comment":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/comments/69555267","html_url":"https://github.com/phpspec/phpspec/issues/605#issuecomment-69555267","issue_url":"https://api.github.com/repos/phpspec/phpspec/issues/605","id":69555267,"user":{"login":"ciaranmcnulty","id":237866,"avatar_url":"https://avatars.githubusercontent.com/u/237866?v=3","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T11:06:13Z","updated_at":"2015-01-12T11:06:13Z","body":"I rubber-ducked this with @MarcelloDuarte this morning and talked myself out of it.\r\n\r\nIt seems to me the use case for skipping examples depending on object availability is for writing integration tests. The example in the linked PR is an integration test written in PhpSpec, which is why it's painful.\r\n\r\nI'm for keeping this pain for people attempting to use the tool for integration testing. I will change my PR to use some other method (possibly PHPUnit) to integration test those components that are strongly coupled to Symfony components.\r\n\r\nI appreciate that some people are using the tool for functional or integration testing, so this extension will be useful for them; @gquemener can you please add a link to your extension in the docs at https://github.com/phpspec/phpspec/blob/master/docs/cookbook/extensions.rst ?"}}