GitHub PullRequestReviewCommentEvent at 2014-12-11 08:07:12
Repository: ConnectionsBundle
Actor: MindaugasR
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/21662388","id":21662388,"diff_hunk":"@@ -0,0 +1,178 @@\n+<?php\n+\n+/*\n+ * This file is part of the ONGR package.\n+ *\n+ * (c) NFQ Technologies UAB <info@nfq.com>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace ONGR\\ConnectionsBundle\\Tests\\Unit\\Event;\n+\n+use ONGR\\ConnectionsBundle\\Event\\ImportConsumeEvent;\n+use ONGR\\ConnectionsBundle\\Event\\ImportItem;\n+use ONGR\\ConnectionsBundle\\Event\\SyncImportConsumeEvent;\n+use ONGR\\ConnectionsBundle\\Event\\SyncImportItem;\n+use ONGR\\ConnectionsBundle\\Pipeline\\Event\\ItemPipelineEvent;\n+use ONGR\\ConnectionsBundle\\Sync\\Panther\\PantherInterface;\n+use ONGR\\ConnectionsBundle\\Tests\\Functional\\Fixtures\\ImportCommandTest\\TestProduct;\n+use ONGR\\TestingBundle\\Document\\Product;\n+\n+class SyncImportConsumeEventTest extends \\PHPUnit_Framework_TestCase\n+{\n+    /**\n+     * Tests what notices are provided to logger in different cases.\n+     *\n+     * @param string $documentType\n+     * @param mixed  $eventItem\n+     * @param string $loggerMethod\n+     * @param array  $loggerNotice\n+     * @param string $managerMethod\n+     *\n+     * @dataProvider onConsumeDataProvider\n+     */\n+    public function testOnConsume($documentType, $eventItem, $loggerMethod, $loggerNotice, $managerMethod)\n+    {\n+        $repo = $this->getMockBuilder('ONGR\\ElasticsearchBundle\\ORM\\Repository')\n+            ->disableOriginalConstructor()\n+            ->setMethods(['remove'])\n+            ->getMock();\n+\n+        $manager = $this->getMockBuilder('ONGR\\ElasticsearchBundle\\ORM\\Manager')\n+            ->disableOriginalConstructor()\n+            ->setMethods(['persist', 'getRepository'])\n+            ->getMock();\n+\n+        $manager->method('getRepository')\n+            ->willReturn($repo);\n+\n+        $panther = $this->getMockBuilder('ONGR\\ConnectionsBundle\\Sync\\Panther\\Panther')\n+            ->disableOriginalConstructor()\n+            ->getMock();\n+\n+        if ($managerMethod !== null) {\n+            $manager->expects($this->once())\n+                ->method($managerMethod);\n+        }\n+\n+        $logger = $this->getMockBuilder('Psr\\Log\\LoggerInterface')\n+            ->setMethods([$loggerMethod])\n+            ->getMockForAbstractClass();\n+        if (count($loggerNotice) == 2) {","path":"Tests/Unit/Event/SyncImportConsumeEventTest.php","position":63,"original_position":63,"commit_id":"500e4cbdc952302d5a05966cbb09039c9ae6a5bb","original_commit_id":"500e4cbdc952302d5a05966cbb09039c9ae6a5bb","user":{"login":"MindaugasR","id":3825716,"avatar_url":"https://avatars.githubusercontent.com/u/3825716?v=3","gravatar_id":"","url":"https://api.github.com/users/MindaugasR","html_url":"https://github.com/MindaugasR","followers_url":"https://api.github.com/users/MindaugasR/followers","following_url":"https://api.github.com/users/MindaugasR/following{/other_user}","gists_url":"https://api.github.com/users/MindaugasR/gists{/gist_id}","starred_url":"https://api.github.com/users/MindaugasR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MindaugasR/subscriptions","organizations_url":"https://api.github.com/users/MindaugasR/orgs","repos_url":"https://api.github.com/users/MindaugasR/repos","events_url":"https://api.github.com/users/MindaugasR/events{/privacy}","received_events_url":"https://api.github.com/users/MindaugasR/received_events","type":"User","site_admin":false},"body":"could you explain what is '== 2'","created_at":"2014-12-11T08:07:12Z","updated_at":"2014-12-11T08:07:12Z","html_url":"https://github.com/ongr-io/ConnectionsBundle/pull/14#discussion_r21662388","pull_request_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/21662388"},"html":{"href":"https://github.com/ongr-io/ConnectionsBundle/pull/14#discussion_r21662388"},"pull_request":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14","id":25820526,"html_url":"https://github.com/ongr-io/ConnectionsBundle/pull/14","diff_url":"https://github.com/ongr-io/ConnectionsBundle/pull/14.diff","patch_url":"https://github.com/ongr-io/ConnectionsBundle/pull/14.patch","issue_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/14","number":14,"state":"open","locked":false,"title":"Added sync:import:command","user":{"login":"gimikus","id":6908580,"avatar_url":"https://avatars.githubusercontent.com/u/6908580?v=3","gravatar_id":"","url":"https://api.github.com/users/gimikus","html_url":"https://github.com/gimikus","followers_url":"https://api.github.com/users/gimikus/followers","following_url":"https://api.github.com/users/gimikus/following{/other_user}","gists_url":"https://api.github.com/users/gimikus/gists{/gist_id}","starred_url":"https://api.github.com/users/gimikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gimikus/subscriptions","organizations_url":"https://api.github.com/users/gimikus/orgs","repos_url":"https://api.github.com/users/gimikus/repos","events_url":"https://api.github.com/users/gimikus/events{/privacy}","received_events_url":"https://api.github.com/users/gimikus/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-10T13:08:49Z","updated_at":"2014-12-11T08:07:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4992c8115dc1d5e504fd5169400a4a15f5b53da6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14/commits","review_comments_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14/comments","review_comment_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/14/comments","statuses_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/statuses/500e4cbdc952302d5a05966cbb09039c9ae6a5bb","head":{"label":"gimikus:sync-import-command","ref":"sync-import-command","sha":"500e4cbdc952302d5a05966cbb09039c9ae6a5bb","user":{"login":"gimikus","id":6908580,"avatar_url":"https://avatars.githubusercontent.com/u/6908580?v=3","gravatar_id":"","url":"https://api.github.com/users/gimikus","html_url":"https://github.com/gimikus","followers_url":"https://api.github.com/users/gimikus/followers","following_url":"https://api.github.com/users/gimikus/following{/other_user}","gists_url":"https://api.github.com/users/gimikus/gists{/gist_id}","starred_url":"https://api.github.com/users/gimikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gimikus/subscriptions","organizations_url":"https://api.github.com/users/gimikus/orgs","repos_url":"https://api.github.com/users/gimikus/repos","events_url":"https://api.github.com/users/gimikus/events{/privacy}","received_events_url":"https://api.github.com/users/gimikus/received_events","type":"User","site_admin":false},"repo":{"id":27817498,"name":"ConnectionsBundle-1","full_name":"gimikus/ConnectionsBundle-1","owner":{"login":"gimikus","id":6908580,"avatar_url":"https://avatars.githubusercontent.com/u/6908580?v=3","gravatar_id":"","url":"https://api.github.com/users/gimikus","html_url":"https://github.com/gimikus","followers_url":"https://api.github.com/users/gimikus/followers","following_url":"https://api.github.com/users/gimikus/following{/other_user}","gists_url":"https://api.github.com/users/gimikus/gists{/gist_id}","starred_url":"https://api.github.com/users/gimikus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gimikus/subscriptions","organizations_url":"https://api.github.com/users/gimikus/orgs","repos_url":"https://api.github.com/users/gimikus/repos","events_url":"https://api.github.com/users/gimikus/events{/privacy}","received_events_url":"https://api.github.com/users/gimikus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gimikus/ConnectionsBundle-1","description":"Data synchronisation and import functionality for ONGR","fork":true,"url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1","forks_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/forks","keys_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/teams","hooks_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/hooks","issue_events_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/issues/events{/number}","events_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/events","assignees_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/assignees{/user}","branches_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/branches{/branch}","tags_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/tags","blobs_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/statuses/{sha}","languages_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/languages","stargazers_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/stargazers","contributors_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/contributors","subscribers_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/subscribers","subscription_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/subscription","commits_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/issues/comments/{number}","contents_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/contents/{+path}","compare_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/merges","archive_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/downloads","issues_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/issues{/number}","pulls_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/pulls{/number}","milestones_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/milestones{/number}","notifications_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/labels{/name}","releases_url":"https://api.github.com/repos/gimikus/ConnectionsBundle-1/releases{/id}","created_at":"2014-12-10T11:50:02Z","updated_at":"2014-12-10T11:50:03Z","pushed_at":"2014-12-10T15:06:43Z","git_url":"git://github.com/gimikus/ConnectionsBundle-1.git","ssh_url":"git@github.com:gimikus/ConnectionsBundle-1.git","clone_url":"https://github.com/gimikus/ConnectionsBundle-1.git","svn_url":"https://github.com/gimikus/ConnectionsBundle-1","homepage":null,"size":0,"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":"ongr-io:master","ref":"master","sha":"04bb87a6f0faf80f91893772c55659346cad40d2","user":{"login":"ongr-io","id":8971056,"avatar_url":"https://avatars.githubusercontent.com/u/8971056?v=3","gravatar_id":"","url":"https://api.github.com/users/ongr-io","html_url":"https://github.com/ongr-io","followers_url":"https://api.github.com/users/ongr-io/followers","following_url":"https://api.github.com/users/ongr-io/following{/other_user}","gists_url":"https://api.github.com/users/ongr-io/gists{/gist_id}","starred_url":"https://api.github.com/users/ongr-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ongr-io/subscriptions","organizations_url":"https://api.github.com/users/ongr-io/orgs","repos_url":"https://api.github.com/users/ongr-io/repos","events_url":"https://api.github.com/users/ongr-io/events{/privacy}","received_events_url":"https://api.github.com/users/ongr-io/received_events","type":"Organization","site_admin":false},"repo":{"id":27768781,"name":"ConnectionsBundle","full_name":"ongr-io/ConnectionsBundle","owner":{"login":"ongr-io","id":8971056,"avatar_url":"https://avatars.githubusercontent.com/u/8971056?v=3","gravatar_id":"","url":"https://api.github.com/users/ongr-io","html_url":"https://github.com/ongr-io","followers_url":"https://api.github.com/users/ongr-io/followers","following_url":"https://api.github.com/users/ongr-io/following{/other_user}","gists_url":"https://api.github.com/users/ongr-io/gists{/gist_id}","starred_url":"https://api.github.com/users/ongr-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ongr-io/subscriptions","organizations_url":"https://api.github.com/users/ongr-io/orgs","repos_url":"https://api.github.com/users/ongr-io/repos","events_url":"https://api.github.com/users/ongr-io/events{/privacy}","received_events_url":"https://api.github.com/users/ongr-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ongr-io/ConnectionsBundle","description":"Data synchronisation and import functionality for ONGR","fork":false,"url":"https://api.github.com/repos/ongr-io/ConnectionsBundle","forks_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/forks","keys_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/teams","hooks_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/hooks","issue_events_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/events","assignees_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/tags","blobs_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/languages","stargazers_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/stargazers","contributors_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/contributors","subscribers_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/subscribers","subscription_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/subscription","commits_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/merges","archive_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/downloads","issues_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/labels{/name}","releases_url":"https://api.github.com/repos/ongr-io/ConnectionsBundle/releases{/id}","created_at":"2014-12-09T13:52:39Z","updated_at":"2014-12-10T15:46:23Z","pushed_at":"2014-12-10T15:46:23Z","git_url":"git://github.com/ongr-io/ConnectionsBundle.git","ssh_url":"git@github.com:ongr-io/ConnectionsBundle.git","clone_url":"https://github.com/ongr-io/ConnectionsBundle.git","svn_url":"https://github.com/ongr-io/ConnectionsBundle","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":12,"forks":8,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14"},"html":{"href":"https://github.com/ongr-io/ConnectionsBundle/pull/14"},"issue":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/14"},"comments":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/ongr-io/ConnectionsBundle/statuses/500e4cbdc952302d5a05966cbb09039c9ae6a5bb"}}}}