{"action":"created","comment":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/26577554","id":26577554,"diff_hunk":"@@ -0,0 +1,31 @@\n+<?php\n+\n+namespace spec\\Pim\\Bundle\\BaseConnectorBundle\\Validator\\Constraints;\n+\n+use PhpSpec\\ObjectBehavior;\n+use Pim\\Bundle\\CatalogBundle\\Manager\\ChannelManager;\n+use Prophecy\\Argument;\n+use Symfony\\Component\\Validator\\Constraint;\n+use Symfony\\Component\\Validator\\Exception\\ConstraintDefinitionException;\n+\n+class ChannelValidatorSpec extends ObjectBehavior\n+{\n+    function let(ChannelManager $channelManager)\n+    {\n+        $this->beConstructedWith($channelManager);\n+    }\n+\n+    function it_is_a_choice_validator()\n+    {\n+        $this->shouldHaveType('\\Symfony\\Component\\Validator\\Constraints\\ChoiceValidator');\n+    }\n+\n+    function it_throws_an_exception_if_there_is_no_channel_choices($channelManager, Constraint $constraint)\n+    {\n+        $channelManager->getChannelChoices()->willReturn([]);\n+\n+        $this\n+            ->shouldThrow(new ConstraintDefinitionException('No channel is set in the application'))\n+            ->duringValidate(Argument::any(), $constraint);\n+    }","path":"spec/Pim/Bundle/BaseConnectorBundle/Validator/Constraints/ChannelValidatorSpec.php","position":40,"original_position":30,"commit_id":"69e328685c38cecd9b061ce4b6da4f70ccd896db","original_commit_id":"b2a72b0b56f272e726444756cad0a4befeed1079","user":{"login":"filipsalpe","id":2479702,"avatar_url":"https://avatars.githubusercontent.com/u/2479702?v=3","gravatar_id":"","url":"https://api.github.com/users/filipsalpe","html_url":"https://github.com/filipsalpe","followers_url":"https://api.github.com/users/filipsalpe/followers","following_url":"https://api.github.com/users/filipsalpe/following{/other_user}","gists_url":"https://api.github.com/users/filipsalpe/gists{/gist_id}","starred_url":"https://api.github.com/users/filipsalpe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipsalpe/subscriptions","organizations_url":"https://api.github.com/users/filipsalpe/orgs","repos_url":"https://api.github.com/users/filipsalpe/repos","events_url":"https://api.github.com/users/filipsalpe/events{/privacy}","received_events_url":"https://api.github.com/users/filipsalpe/received_events","type":"User","site_admin":false},"body":"Yeah, it's more about speccing that this class calls the ChoiceValidator correctly","created_at":"2015-03-17T14:36:21Z","updated_at":"2015-03-17T14:36:21Z","html_url":"https://github.com/akeneo/pim-community-dev/pull/2341#discussion_r26577554","pull_request_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341","_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/26577554"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/2341#discussion_r26577554"},"pull_request":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341"}}},"pull_request":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341","id":31265510,"html_url":"https://github.com/akeneo/pim-community-dev/pull/2341","diff_url":"https://github.com/akeneo/pim-community-dev/pull/2341.diff","patch_url":"https://github.com/akeneo/pim-community-dev/pull/2341.patch","issue_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/2341","number":2341,"state":"open","locked":false,"title":"[WIP] PIM-3896: Improve PHPSpec coverage of BaseConnector and replace unit test by spec","user":{"login":"willy-ahva","id":7206368,"avatar_url":"https://avatars.githubusercontent.com/u/7206368?v=3","gravatar_id":"","url":"https://api.github.com/users/willy-ahva","html_url":"https://github.com/willy-ahva","followers_url":"https://api.github.com/users/willy-ahva/followers","following_url":"https://api.github.com/users/willy-ahva/following{/other_user}","gists_url":"https://api.github.com/users/willy-ahva/gists{/gist_id}","starred_url":"https://api.github.com/users/willy-ahva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willy-ahva/subscriptions","organizations_url":"https://api.github.com/users/willy-ahva/orgs","repos_url":"https://api.github.com/users/willy-ahva/repos","events_url":"https://api.github.com/users/willy-ahva/events{/privacy}","received_events_url":"https://api.github.com/users/willy-ahva/received_events","type":"User","site_admin":false},"body":"| Q                    | A\r\n| -------------------- | ---\r\n| Bug fix?             | n\r\n| New feature?         | n\r\n| BC breaks?           | n\r\n| CI currently passes? | \r\n| Tests pass?          | y\r\n| Scenarios pass?      | y\r\n| Checkstyle issues?*  | n\r\n| PMD issues?**        | n\r\n| Changelog updated?   | n\r\n| Fixed tickets        | PIM-3896\r\n| DB schema updated?   | n\r\n| Migration script?    | n\r\n| Doc PR               |","created_at":"2015-03-16T17:30:29Z","updated_at":"2015-03-17T14:36:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3685091bb3ad700a8dc56a59e8d922c3145ece97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341/commits","review_comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341/comments","review_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/2341/comments","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/69e328685c38cecd9b061ce4b6da4f70ccd896db","head":{"label":"akeneo:PIM-3896","ref":"PIM-3896","sha":"69e328685c38cecd9b061ce4b6da4f70ccd896db","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"Akeneo PIM development repository","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","created_at":"2012-08-10T09:27:26Z","updated_at":"2015-03-17T13:38:21Z","pushed_at":"2015-03-17T14:24:44Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://akeneo.com","size":153561,"stargazers_count":208,"watchers_count":208,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":52,"forks":95,"open_issues":52,"watchers":208,"default_branch":"master"}},"base":{"label":"akeneo:master","ref":"master","sha":"ba3ba03cedde344ec82c4a0fd3bd0d9a05951c4a","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"Akeneo PIM development repository","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","created_at":"2012-08-10T09:27:26Z","updated_at":"2015-03-17T13:38:21Z","pushed_at":"2015-03-17T14:24:44Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://akeneo.com","size":153561,"stargazers_count":208,"watchers_count":208,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":95,"mirror_url":null,"open_issues_count":52,"forks":95,"open_issues":52,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/2341"},"issue":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/2341"},"comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/2341/comments"},"review_comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341/comments"},"review_comment":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/2341/commits"},"statuses":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/69e328685c38cecd9b061ce4b6da4f70ccd896db"}}}}