{"action":"created","comment":{"url":"https://api.github.com/repos/abdala/nasa/pulls/comments/139528987","pull_request_review_id":63458511,"id":139528987,"diff_hunk":"@@ -0,0 +1,126 @@\n+<?php\n+\n+namespace Nasa\\Test;\n+\n+use PHPUnit\\Framework\\TestCase;\n+use Nasa\\Rover;\n+use Nasa\\Action;\n+use Nasa\\CardinalPoint;\n+use Nasa\\Position;\n+use Nasa\\Coordinate;\n+use Nasa\\Exception\\Invalid;\n+\n+class RoverTest extends TestCase\n+{\n+    /**\n+     * @test\n+     *\n+     * @dataProvider movements\n+     */\n+    public function itCanMove($point, $expected)\n+    {\n+        $action = $this->getMockBuilder(Action::class)\n+                       ->disableOriginalConstructor()\n+                       ->getMock();\n+\n+        $action->method('isMove')\n+               ->willReturn(true);\n+        \n+        $rover = $this->createRover();\n+        \n+        $rover->getPosition()\n+              ->getCardinalPoint()\n+              ->method('getPoint')\n+              ->willReturn($point);\n+\n+        $coordinate = $rover->move($action)->getCoordinate();\n+        \n+        $this->assertTrue($expected['x'] === $coordinate->getX());\n+        $this->assertTrue($expected['y'] === $coordinate->getY());\n+    }\n+\n+    /**\n+     * @test\n+     *\n+     * @dataProvider rotates\n+     */\n+    public function itCanRotate($direction, $point, $expected)\n+    {\n+        $action = $this->getMockBuilder(Action::class)\n+                       ->disableOriginalConstructor()\n+                       ->getMock();\n+\n+        $action->method('getMovement')\n+               ->willReturn($direction);\n+        \n+        $rover = $this->createRover();\n+        \n+        $rover->getPosition()\n+              ->getCardinalPoint()\n+              ->method('getPoint')\n+              ->willReturn($point);\n+\n+        $returnPoint = $rover->rotate($action)->getPoint();\n+        \n+        $this->assertEquals($returnPoint, $expected);\n+    }\n+\n+    private function createRover()","path":"tests/RoverTest.php","position":68,"original_position":68,"commit_id":"ccf2931e72acb706a49d3e4173aa386b18a98e14","original_commit_id":"ccf2931e72acb706a49d3e4173aa386b18a98e14","user":{"login":"malukenho","id":3275172,"avatar_url":"https://avatars2.githubusercontent.com/u/3275172?v=4","gravatar_id":"","url":"https://api.github.com/users/malukenho","html_url":"https://github.com/malukenho","followers_url":"https://api.github.com/users/malukenho/followers","following_url":"https://api.github.com/users/malukenho/following{/other_user}","gists_url":"https://api.github.com/users/malukenho/gists{/gist_id}","starred_url":"https://api.github.com/users/malukenho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malukenho/subscriptions","organizations_url":"https://api.github.com/users/malukenho/orgs","repos_url":"https://api.github.com/users/malukenho/repos","events_url":"https://api.github.com/users/malukenho/events{/privacy}","received_events_url":"https://api.github.com/users/malukenho/received_events","type":"User","site_admin":false},"body":"type?","created_at":"2017-09-18T20:19:08Z","updated_at":"2017-09-18T20:25:45Z","html_url":"https://github.com/abdala/nasa/pull/1#discussion_r139528987","pull_request_url":"https://api.github.com/repos/abdala/nasa/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/abdala/nasa/pulls/comments/139528987"},"html":{"href":"https://github.com/abdala/nasa/pull/1#discussion_r139528987"},"pull_request":{"href":"https://api.github.com/repos/abdala/nasa/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/abdala/nasa/pulls/1","id":141613737,"html_url":"https://github.com/abdala/nasa/pull/1","diff_url":"https://github.com/abdala/nasa/pull/1.diff","patch_url":"https://github.com/abdala/nasa/pull/1.patch","issue_url":"https://api.github.com/repos/abdala/nasa/issues/1","number":1,"state":"open","locked":false,"title":"Code to review","user":{"login":"abdala","id":219340,"avatar_url":"https://avatars1.githubusercontent.com/u/219340?v=4","gravatar_id":"","url":"https://api.github.com/users/abdala","html_url":"https://github.com/abdala","followers_url":"https://api.github.com/users/abdala/followers","following_url":"https://api.github.com/users/abdala/following{/other_user}","gists_url":"https://api.github.com/users/abdala/gists{/gist_id}","starred_url":"https://api.github.com/users/abdala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdala/subscriptions","organizations_url":"https://api.github.com/users/abdala/orgs","repos_url":"https://api.github.com/users/abdala/repos","events_url":"https://api.github.com/users/abdala/events{/privacy}","received_events_url":"https://api.github.com/users/abdala/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-09-18T14:13:46Z","updated_at":"2017-09-18T20:25:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43008bdc784accbe60d2301df5246191d7e169fb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/abdala/nasa/pulls/1/commits","review_comments_url":"https://api.github.com/repos/abdala/nasa/pulls/1/comments","review_comment_url":"https://api.github.com/repos/abdala/nasa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/abdala/nasa/issues/1/comments","statuses_url":"https://api.github.com/repos/abdala/nasa/statuses/ccf2931e72acb706a49d3e4173aa386b18a98e14","head":{"label":"abdala:review","ref":"review","sha":"ccf2931e72acb706a49d3e4173aa386b18a98e14","user":{"login":"abdala","id":219340,"avatar_url":"https://avatars1.githubusercontent.com/u/219340?v=4","gravatar_id":"","url":"https://api.github.com/users/abdala","html_url":"https://github.com/abdala","followers_url":"https://api.github.com/users/abdala/followers","following_url":"https://api.github.com/users/abdala/following{/other_user}","gists_url":"https://api.github.com/users/abdala/gists{/gist_id}","starred_url":"https://api.github.com/users/abdala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdala/subscriptions","organizations_url":"https://api.github.com/users/abdala/orgs","repos_url":"https://api.github.com/users/abdala/repos","events_url":"https://api.github.com/users/abdala/events{/privacy}","received_events_url":"https://api.github.com/users/abdala/received_events","type":"User","site_admin":false},"repo":{"id":103946769,"name":"nasa","full_name":"abdala/nasa","owner":{"login":"abdala","id":219340,"avatar_url":"https://avatars1.githubusercontent.com/u/219340?v=4","gravatar_id":"","url":"https://api.github.com/users/abdala","html_url":"https://github.com/abdala","followers_url":"https://api.github.com/users/abdala/followers","following_url":"https://api.github.com/users/abdala/following{/other_user}","gists_url":"https://api.github.com/users/abdala/gists{/gist_id}","starred_url":"https://api.github.com/users/abdala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdala/subscriptions","organizations_url":"https://api.github.com/users/abdala/orgs","repos_url":"https://api.github.com/users/abdala/repos","events_url":"https://api.github.com/users/abdala/events{/privacy}","received_events_url":"https://api.github.com/users/abdala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abdala/nasa","description":null,"fork":false,"url":"https://api.github.com/repos/abdala/nasa","forks_url":"https://api.github.com/repos/abdala/nasa/forks","keys_url":"https://api.github.com/repos/abdala/nasa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abdala/nasa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abdala/nasa/teams","hooks_url":"https://api.github.com/repos/abdala/nasa/hooks","issue_events_url":"https://api.github.com/repos/abdala/nasa/issues/events{/number}","events_url":"https://api.github.com/repos/abdala/nasa/events","assignees_url":"https://api.github.com/repos/abdala/nasa/assignees{/user}","branches_url":"https://api.github.com/repos/abdala/nasa/branches{/branch}","tags_url":"https://api.github.com/repos/abdala/nasa/tags","blobs_url":"https://api.github.com/repos/abdala/nasa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abdala/nasa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abdala/nasa/git/refs{/sha}","trees_url":"https://api.github.com/repos/abdala/nasa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abdala/nasa/statuses/{sha}","languages_url":"https://api.github.com/repos/abdala/nasa/languages","stargazers_url":"https://api.github.com/repos/abdala/nasa/stargazers","contributors_url":"https://api.github.com/repos/abdala/nasa/contributors","subscribers_url":"https://api.github.com/repos/abdala/nasa/subscribers","subscription_url":"https://api.github.com/repos/abdala/nasa/subscription","commits_url":"https://api.github.com/repos/abdala/nasa/commits{/sha}","git_commits_url":"https://api.github.com/repos/abdala/nasa/git/commits{/sha}","comments_url":"https://api.github.com/repos/abdala/nasa/comments{/number}","issue_comment_url":"https://api.github.com/repos/abdala/nasa/issues/comments{/number}","contents_url":"https://api.github.com/repos/abdala/nasa/contents/{+path}","compare_url":"https://api.github.com/repos/abdala/nasa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abdala/nasa/merges","archive_url":"https://api.github.com/repos/abdala/nasa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abdala/nasa/downloads","issues_url":"https://api.github.com/repos/abdala/nasa/issues{/number}","pulls_url":"https://api.github.com/repos/abdala/nasa/pulls{/number}","milestones_url":"https://api.github.com/repos/abdala/nasa/milestones{/number}","notifications_url":"https://api.github.com/repos/abdala/nasa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abdala/nasa/labels{/name}","releases_url":"https://api.github.com/repos/abdala/nasa/releases{/id}","deployments_url":"https://api.github.com/repos/abdala/nasa/deployments","created_at":"2017-09-18T14:04:46Z","updated_at":"2017-09-18T14:04:46Z","pushed_at":"2017-09-18T15:16:20Z","git_url":"git://github.com/abdala/nasa.git","ssh_url":"git@github.com:abdala/nasa.git","clone_url":"https://github.com/abdala/nasa.git","svn_url":"https://github.com/abdala/nasa","homepage":null,"size":18,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"abdala:master","ref":"master","sha":"94782d5e623274f8766e3e37bb0b3388b4d73727","user":{"login":"abdala","id":219340,"avatar_url":"https://avatars1.githubusercontent.com/u/219340?v=4","gravatar_id":"","url":"https://api.github.com/users/abdala","html_url":"https://github.com/abdala","followers_url":"https://api.github.com/users/abdala/followers","following_url":"https://api.github.com/users/abdala/following{/other_user}","gists_url":"https://api.github.com/users/abdala/gists{/gist_id}","starred_url":"https://api.github.com/users/abdala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdala/subscriptions","organizations_url":"https://api.github.com/users/abdala/orgs","repos_url":"https://api.github.com/users/abdala/repos","events_url":"https://api.github.com/users/abdala/events{/privacy}","received_events_url":"https://api.github.com/users/abdala/received_events","type":"User","site_admin":false},"repo":{"id":103946769,"name":"nasa","full_name":"abdala/nasa","owner":{"login":"abdala","id":219340,"avatar_url":"https://avatars1.githubusercontent.com/u/219340?v=4","gravatar_id":"","url":"https://api.github.com/users/abdala","html_url":"https://github.com/abdala","followers_url":"https://api.github.com/users/abdala/followers","following_url":"https://api.github.com/users/abdala/following{/other_user}","gists_url":"https://api.github.com/users/abdala/gists{/gist_id}","starred_url":"https://api.github.com/users/abdala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdala/subscriptions","organizations_url":"https://api.github.com/users/abdala/orgs","repos_url":"https://api.github.com/users/abdala/repos","events_url":"https://api.github.com/users/abdala/events{/privacy}","received_events_url":"https://api.github.com/users/abdala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abdala/nasa","description":null,"fork":false,"url":"https://api.github.com/repos/abdala/nasa","forks_url":"https://api.github.com/repos/abdala/nasa/forks","keys_url":"https://api.github.com/repos/abdala/nasa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abdala/nasa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abdala/nasa/teams","hooks_url":"https://api.github.com/repos/abdala/nasa/hooks","issue_events_url":"https://api.github.com/repos/abdala/nasa/issues/events{/number}","events_url":"https://api.github.com/repos/abdala/nasa/events","assignees_url":"https://api.github.com/repos/abdala/nasa/assignees{/user}","branches_url":"https://api.github.com/repos/abdala/nasa/branches{/branch}","tags_url":"https://api.github.com/repos/abdala/nasa/tags","blobs_url":"https://api.github.com/repos/abdala/nasa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abdala/nasa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abdala/nasa/git/refs{/sha}","trees_url":"https://api.github.com/repos/abdala/nasa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abdala/nasa/statuses/{sha}","languages_url":"https://api.github.com/repos/abdala/nasa/languages","stargazers_url":"https://api.github.com/repos/abdala/nasa/stargazers","contributors_url":"https://api.github.com/repos/abdala/nasa/contributors","subscribers_url":"https://api.github.com/repos/abdala/nasa/subscribers","subscription_url":"https://api.github.com/repos/abdala/nasa/subscription","commits_url":"https://api.github.com/repos/abdala/nasa/commits{/sha}","git_commits_url":"https://api.github.com/repos/abdala/nasa/git/commits{/sha}","comments_url":"https://api.github.com/repos/abdala/nasa/comments{/number}","issue_comment_url":"https://api.github.com/repos/abdala/nasa/issues/comments{/number}","contents_url":"https://api.github.com/repos/abdala/nasa/contents/{+path}","compare_url":"https://api.github.com/repos/abdala/nasa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abdala/nasa/merges","archive_url":"https://api.github.com/repos/abdala/nasa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abdala/nasa/downloads","issues_url":"https://api.github.com/repos/abdala/nasa/issues{/number}","pulls_url":"https://api.github.com/repos/abdala/nasa/pulls{/number}","milestones_url":"https://api.github.com/repos/abdala/nasa/milestones{/number}","notifications_url":"https://api.github.com/repos/abdala/nasa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abdala/nasa/labels{/name}","releases_url":"https://api.github.com/repos/abdala/nasa/releases{/id}","deployments_url":"https://api.github.com/repos/abdala/nasa/deployments","created_at":"2017-09-18T14:04:46Z","updated_at":"2017-09-18T14:04:46Z","pushed_at":"2017-09-18T15:16:20Z","git_url":"git://github.com/abdala/nasa.git","ssh_url":"git@github.com:abdala/nasa.git","clone_url":"https://github.com/abdala/nasa.git","svn_url":"https://github.com/abdala/nasa","homepage":null,"size":18,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abdala/nasa/pulls/1"},"html":{"href":"https://github.com/abdala/nasa/pull/1"},"issue":{"href":"https://api.github.com/repos/abdala/nasa/issues/1"},"comments":{"href":"https://api.github.com/repos/abdala/nasa/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/abdala/nasa/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/abdala/nasa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/abdala/nasa/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/abdala/nasa/statuses/ccf2931e72acb706a49d3e4173aa386b18a98e14"}},"author_association":"OWNER"}}
{"actor":{"display_login":"malukenho"}}