{"action":"created","comment":{"url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/comments/23368718","id":23368718,"diff_hunk":"@@ -0,0 +1,71 @@\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\\MagentoConnectorBundle\\Tests\\Unit\\Document;\n+\n+use ONGR\\MagentoConnectorBundle\\Tests\\app\\fixtures\\ExpectedDocuments\\ExpectedDocuments;\n+\n+abstract class AbstractGetterSetterTest extends \\PHPUnit_Framework_TestCase\n+{\n+    /**\n+     * @var DocumentInterface\n+     */\n+    protected $document;\n+\n+    /**\n+     * Test getters and setters.\n+     *\n+     * @param string $setter\n+     * @param string $getter\n+     * @param string $expectedMethod\n+     * @param string $addObject\n+     * @param string $stringSetter\n+     * @param string $stringForSetter\n+     *\n+     * @dataProvider attributesDataProvider\n+     */\n+    public function testGettersAndSetters(\n+        $setter,\n+        $getter,\n+        $expectedMethod,\n+        $addObject = null,\n+        $stringSetter = null,\n+        $stringForSetter = null\n+    ) {\n+        $this->document->$setter(ExpectedDocuments::$expectedMethod(1));\n+        $this->assertEquals(ExpectedDocuments::$expectedMethod(1), $this->document->$getter());\n+\n+        if (!empty($addObject)) {\n+            $this->document->$addObject(ExpectedDocuments::$expectedMethod(1, 1)[0]);\n+            $this->assertEquals(\n+                ExpectedDocuments::$expectedMethod(2),\n+                $this->document->$getter()\n+            );\n+            $this->assertEquals(2, count($this->document->$getter()));\n+        }\n+\n+        if (!empty($stringSetter)) {\n+            $this->document->$stringSetter($stringForSetter);\n+            $this->assertEquals(\n+                ExpectedDocuments::$expectedMethod(3),\n+                $this->document->$getter()\n+            );\n+            $this->assertEquals(3, count($this->document->$getter()));\n+        }\n+    }\n+\n+    /**\n+     * Attributes test data provider.\n+     *\n+     * @return array\n+     */\n+    abstract public function attributesDataProvider();","path":"Tests/Unit/Document/AbstractGetterSetterTest.php","position":70,"original_position":70,"commit_id":"0596548a817e5b81fc8eb1cb083f49d929ac4c1e","original_commit_id":"0596548a817e5b81fc8eb1cb083f49d929ac4c1e","user":{"login":"tautrimas","id":364223,"avatar_url":"https://avatars.githubusercontent.com/u/364223?v=3","gravatar_id":"","url":"https://api.github.com/users/tautrimas","html_url":"https://github.com/tautrimas","followers_url":"https://api.github.com/users/tautrimas/followers","following_url":"https://api.github.com/users/tautrimas/following{/other_user}","gists_url":"https://api.github.com/users/tautrimas/gists{/gist_id}","starred_url":"https://api.github.com/users/tautrimas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautrimas/subscriptions","organizations_url":"https://api.github.com/users/tautrimas/orgs","repos_url":"https://api.github.com/users/tautrimas/repos","events_url":"https://api.github.com/users/tautrimas/events{/privacy}","received_events_url":"https://api.github.com/users/tautrimas/received_events","type":"User","site_admin":false},"body":"Standard requires providers to be above their tests.","created_at":"2015-01-22T11:12:08Z","updated_at":"2015-01-22T11:12:08Z","html_url":"https://github.com/ongr-io/MagentoConnectorBundle/pull/25#discussion_r23368718","pull_request_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/comments/23368718"},"html":{"href":"https://github.com/ongr-io/MagentoConnectorBundle/pull/25#discussion_r23368718"},"pull_request":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25","id":27826688,"html_url":"https://github.com/ongr-io/MagentoConnectorBundle/pull/25","diff_url":"https://github.com/ongr-io/MagentoConnectorBundle/pull/25.diff","patch_url":"https://github.com/ongr-io/MagentoConnectorBundle/pull/25.patch","issue_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues/25","number":25,"state":"open","locked":false,"title":"add unit test for documents","user":{"login":"tfe2012","id":8733714,"avatar_url":"https://avatars.githubusercontent.com/u/8733714?v=3","gravatar_id":"","url":"https://api.github.com/users/tfe2012","html_url":"https://github.com/tfe2012","followers_url":"https://api.github.com/users/tfe2012/followers","following_url":"https://api.github.com/users/tfe2012/following{/other_user}","gists_url":"https://api.github.com/users/tfe2012/gists{/gist_id}","starred_url":"https://api.github.com/users/tfe2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfe2012/subscriptions","organizations_url":"https://api.github.com/users/tfe2012/orgs","repos_url":"https://api.github.com/users/tfe2012/repos","events_url":"https://api.github.com/users/tfe2012/events{/privacy}","received_events_url":"https://api.github.com/users/tfe2012/received_events","type":"User","site_admin":false},"body":"Closes #10 ","created_at":"2015-01-22T08:56:55Z","updated_at":"2015-01-22T11:12:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c976a2adafb45b968fcc26d24c6b05fb6a7a4baa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25/commits","review_comments_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25/comments","review_comment_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues/25/comments","statuses_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/statuses/0596548a817e5b81fc8eb1cb083f49d929ac4c1e","head":{"label":"tfe2012:import_unit_test","ref":"import_unit_test","sha":"0596548a817e5b81fc8eb1cb083f49d929ac4c1e","user":{"login":"tfe2012","id":8733714,"avatar_url":"https://avatars.githubusercontent.com/u/8733714?v=3","gravatar_id":"","url":"https://api.github.com/users/tfe2012","html_url":"https://github.com/tfe2012","followers_url":"https://api.github.com/users/tfe2012/followers","following_url":"https://api.github.com/users/tfe2012/following{/other_user}","gists_url":"https://api.github.com/users/tfe2012/gists{/gist_id}","starred_url":"https://api.github.com/users/tfe2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfe2012/subscriptions","organizations_url":"https://api.github.com/users/tfe2012/orgs","repos_url":"https://api.github.com/users/tfe2012/repos","events_url":"https://api.github.com/users/tfe2012/events{/privacy}","received_events_url":"https://api.github.com/users/tfe2012/received_events","type":"User","site_admin":false},"repo":{"id":29193339,"name":"MagentoConnectorBundle","full_name":"tfe2012/MagentoConnectorBundle","owner":{"login":"tfe2012","id":8733714,"avatar_url":"https://avatars.githubusercontent.com/u/8733714?v=3","gravatar_id":"","url":"https://api.github.com/users/tfe2012","html_url":"https://github.com/tfe2012","followers_url":"https://api.github.com/users/tfe2012/followers","following_url":"https://api.github.com/users/tfe2012/following{/other_user}","gists_url":"https://api.github.com/users/tfe2012/gists{/gist_id}","starred_url":"https://api.github.com/users/tfe2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfe2012/subscriptions","organizations_url":"https://api.github.com/users/tfe2012/orgs","repos_url":"https://api.github.com/users/tfe2012/repos","events_url":"https://api.github.com/users/tfe2012/events{/privacy}","received_events_url":"https://api.github.com/users/tfe2012/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tfe2012/MagentoConnectorBundle","description":"Magento integration with ONGR platform bundle.","fork":true,"url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle","forks_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/forks","keys_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/teams","hooks_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/hooks","issue_events_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/issues/events{/number}","events_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/events","assignees_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/assignees{/user}","branches_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/branches{/branch}","tags_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/tags","blobs_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/languages","stargazers_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/stargazers","contributors_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/contributors","subscribers_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/subscribers","subscription_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/subscription","commits_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/contents/{+path}","compare_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/merges","archive_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/downloads","issues_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/issues{/number}","pulls_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/labels{/name}","releases_url":"https://api.github.com/repos/tfe2012/MagentoConnectorBundle/releases{/id}","created_at":"2015-01-13T14:24:24Z","updated_at":"2015-01-13T14:24:25Z","pushed_at":"2015-01-22T08:56:26Z","git_url":"git://github.com/tfe2012/MagentoConnectorBundle.git","ssh_url":"git@github.com:tfe2012/MagentoConnectorBundle.git","clone_url":"https://github.com/tfe2012/MagentoConnectorBundle.git","svn_url":"https://github.com/tfe2012/MagentoConnectorBundle","homepage":"http://ongr.io","size":3704,"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":"f97752f09bc98ef6b22894cfb6e91caf401b3a2b","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":28636063,"name":"MagentoConnectorBundle","full_name":"ongr-io/MagentoConnectorBundle","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/MagentoConnectorBundle","description":"Magento integration with ONGR platform bundle.","fork":false,"url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle","forks_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/forks","keys_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/teams","hooks_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/hooks","issue_events_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/events","assignees_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/tags","blobs_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/languages","stargazers_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/stargazers","contributors_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/contributors","subscribers_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/subscribers","subscription_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/subscription","commits_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/merges","archive_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/downloads","issues_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/labels{/name}","releases_url":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/releases{/id}","created_at":"2014-12-30T15:44:57Z","updated_at":"2015-01-21T08:14:47Z","pushed_at":"2015-01-21T08:14:46Z","git_url":"git://github.com/ongr-io/MagentoConnectorBundle.git","ssh_url":"git@github.com:ongr-io/MagentoConnectorBundle.git","clone_url":"https://github.com/ongr-io/MagentoConnectorBundle.git","svn_url":"https://github.com/ongr-io/MagentoConnectorBundle","homepage":"http://ongr.io","size":5292,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":10,"forks":5,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25"},"html":{"href":"https://github.com/ongr-io/MagentoConnectorBundle/pull/25"},"issue":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues/25"},"comments":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/ongr-io/MagentoConnectorBundle/statuses/0596548a817e5b81fc8eb1cb083f49d929ac4c1e"}}}}