{"action":"created","comment":{"url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/comments/55639054","id":55639054,"diff_hunk":"@@ -0,0 +1,61 @@\n+<?php\n+/*\n+ * Copyright (c) 2012-2013 KUBO Atsuhiro <kubo@iteman.jp>,\n+ *               2014 YAMANE Nana <shigematsu.nana@gmail.com>,\n+ * All rights reserved.\n+ *\n+ * This file is part of PHPMentors_Training_Example_Symfony.\n+ *\n+ * This program and the accompanying materials are made available under\n+ * the terms of the BSD 2-Clause License which accompanies this\n+ * distribution, and is available at http://opensource.org/licenses/BSD-2-Clause\n+ */\n+\n+namespace Example\\UserRegistrationBundle\\Tests\\Usecase;\n+\n+use Example\\UserRegistrationBundle\\Entity\\User;\n+use Example\\UserRegistrationBundle\\Tests\\Test\\ComponentAwareTestCase;\n+\n+class UserRegistrationUsecaseTest extends ComponentAwareTestCase\n+{\n+    /**\n+     * @test\n+     */\n+    public function ユーザーを登録する()\n+    {\n+        $userClass = 'Example\\UserRegistrationBundle\\Entity\\User';\n+        $userRepository = \\Phake::mock('Example\\UserRegistrationBundle\\Repository\\UserRepository');\n+        $password = 'PASSWORD';\n+        $user = \\Phake::mock($userClass);\n+        \\Phake::when($user)->getPassword()->thenReturn($password);\n+\n+        $entityManager = \\Phake::mock('Doctrine\\ORM\\EntityManagerInterface');\n+        \\Phake::when($entityManager)->getRepository($userClass)->thenReturn($userRepository);\n+        $this->setComponent('example_user_registration.entity_manager', $entityManager);\n+\n+        $passwordEncoder = \\Phake::mock('Symfony\\Component\\Security\\Core\\Encoder\\PasswordEncoderInterface');\n+        \\Phake::when($passwordEncoder)->encodePassword($this->anything(), $this->anything())->thenReturn($password);\n+        $this->setComponent('example_user_registration.password_encoder', $passwordEncoder);\n+\n+        $activationKey = 'ACTIVATION_KEY';\n+        $secureRandom = \\Phake::mock('Symfony\\Component\\Security\\Core\\Util\\SecureRandomInterface');\n+        \\Phake::when($secureRandom)->nextBytes($this->anything())->thenReturn($activationKey);\n+        $this->setComponent('security.secure_random', $secureRandom);\n+\n+        $userTransfer = \\Phake::mock('Example\\UserRegistrationBundle\\Transfer\\UserTransfer');","path":"src/Example/UserRegistrationBundle/Tests/Usecase/UserRegistrationUsecaseTest.php","position":45,"original_position":45,"commit_id":"57243332ee26c27a333875c717cb04d7d4bc1a1a","original_commit_id":"57243332ee26c27a333875c717cb04d7d4bc1a1a","user":{"login":"sweep3092","id":5488453,"avatar_url":"https://avatars.githubusercontent.com/u/5488453?v=3","gravatar_id":"","url":"https://api.github.com/users/sweep3092","html_url":"https://github.com/sweep3092","followers_url":"https://api.github.com/users/sweep3092/followers","following_url":"https://api.github.com/users/sweep3092/following{/other_user}","gists_url":"https://api.github.com/users/sweep3092/gists{/gist_id}","starred_url":"https://api.github.com/users/sweep3092/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweep3092/subscriptions","organizations_url":"https://api.github.com/users/sweep3092/orgs","repos_url":"https://api.github.com/users/sweep3092/repos","events_url":"https://api.github.com/users/sweep3092/events{/privacy}","received_events_url":"https://api.github.com/users/sweep3092/received_events","type":"User","site_admin":false},"body":"__[development][phpmd]__\n* Avoid using static access to class '\\Phake' in method 'ユーザーを登録する'.","created_at":"2016-03-10T06:33:47Z","updated_at":"2016-03-10T06:33:47Z","html_url":"https://github.com/sweep3092/phpmentors-training-example-symfony/pull/1#discussion_r55639054","pull_request_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/comments/55639054"},"html":{"href":"https://github.com/sweep3092/phpmentors-training-example-symfony/pull/1#discussion_r55639054"},"pull_request":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1","id":62345269,"html_url":"https://github.com/sweep3092/phpmentors-training-example-symfony/pull/1","diff_url":"https://github.com/sweep3092/phpmentors-training-example-symfony/pull/1.diff","patch_url":"https://github.com/sweep3092/phpmentors-training-example-symfony/pull/1.patch","issue_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/1","number":1,"state":"open","locked":false,"title":"Hogehoge","user":{"login":"sweep3092","id":5488453,"avatar_url":"https://avatars.githubusercontent.com/u/5488453?v=3","gravatar_id":"","url":"https://api.github.com/users/sweep3092","html_url":"https://github.com/sweep3092","followers_url":"https://api.github.com/users/sweep3092/followers","following_url":"https://api.github.com/users/sweep3092/following{/other_user}","gists_url":"https://api.github.com/users/sweep3092/gists{/gist_id}","starred_url":"https://api.github.com/users/sweep3092/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweep3092/subscriptions","organizations_url":"https://api.github.com/users/sweep3092/orgs","repos_url":"https://api.github.com/users/sweep3092/repos","events_url":"https://api.github.com/users/sweep3092/events{/privacy}","received_events_url":"https://api.github.com/users/sweep3092/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T06:28:11Z","updated_at":"2016-03-10T06:33:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfc1358b29a8d346961ca25aaf2d7a5d4dbd9a95","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/1/comments","statuses_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/statuses/57243332ee26c27a333875c717cb04d7d4bc1a1a","head":{"label":"sweep3092:hogehoge","ref":"hogehoge","sha":"57243332ee26c27a333875c717cb04d7d4bc1a1a","user":{"login":"sweep3092","id":5488453,"avatar_url":"https://avatars.githubusercontent.com/u/5488453?v=3","gravatar_id":"","url":"https://api.github.com/users/sweep3092","html_url":"https://github.com/sweep3092","followers_url":"https://api.github.com/users/sweep3092/followers","following_url":"https://api.github.com/users/sweep3092/following{/other_user}","gists_url":"https://api.github.com/users/sweep3092/gists{/gist_id}","starred_url":"https://api.github.com/users/sweep3092/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweep3092/subscriptions","organizations_url":"https://api.github.com/users/sweep3092/orgs","repos_url":"https://api.github.com/users/sweep3092/repos","events_url":"https://api.github.com/users/sweep3092/events{/privacy}","received_events_url":"https://api.github.com/users/sweep3092/received_events","type":"User","site_admin":false},"repo":{"id":51567323,"name":"phpmentors-training-example-symfony","full_name":"sweep3092/phpmentors-training-example-symfony","owner":{"login":"sweep3092","id":5488453,"avatar_url":"https://avatars.githubusercontent.com/u/5488453?v=3","gravatar_id":"","url":"https://api.github.com/users/sweep3092","html_url":"https://github.com/sweep3092","followers_url":"https://api.github.com/users/sweep3092/followers","following_url":"https://api.github.com/users/sweep3092/following{/other_user}","gists_url":"https://api.github.com/users/sweep3092/gists{/gist_id}","starred_url":"https://api.github.com/users/sweep3092/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweep3092/subscriptions","organizations_url":"https://api.github.com/users/sweep3092/orgs","repos_url":"https://api.github.com/users/sweep3092/repos","events_url":"https://api.github.com/users/sweep3092/events{/privacy}","received_events_url":"https://api.github.com/users/sweep3092/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sweep3092/phpmentors-training-example-symfony","description":"Symfony2ベースのユーザー登録サンプル","fork":true,"url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony","forks_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/forks","keys_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/teams","hooks_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/hooks","issue_events_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/events{/number}","events_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/events","assignees_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/assignees{/user}","branches_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/branches{/branch}","tags_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/tags","blobs_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/languages","stargazers_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/stargazers","contributors_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/contributors","subscribers_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/subscribers","subscription_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/subscription","commits_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/contents/{+path}","compare_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/merges","archive_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/downloads","issues_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues{/number}","pulls_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/labels{/name}","releases_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/releases{/id}","deployments_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/deployments","created_at":"2016-02-12T04:37:46Z","updated_at":"2016-02-12T04:37:47Z","pushed_at":"2016-03-10T06:28:11Z","git_url":"git://github.com/sweep3092/phpmentors-training-example-symfony.git","ssh_url":"git@github.com:sweep3092/phpmentors-training-example-symfony.git","clone_url":"https://github.com/sweep3092/phpmentors-training-example-symfony.git","svn_url":"https://github.com/sweep3092/phpmentors-training-example-symfony","homepage":"https://github.com/phpmentors-jp/phpmentors-training-example-symfony/wiki","size":620,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"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":"1.5-2.6.1"}},"base":{"label":"sweep3092:master","ref":"master","sha":"6ccaae1c231bd8783844e5be919196230c4a8966","user":{"login":"sweep3092","id":5488453,"avatar_url":"https://avatars.githubusercontent.com/u/5488453?v=3","gravatar_id":"","url":"https://api.github.com/users/sweep3092","html_url":"https://github.com/sweep3092","followers_url":"https://api.github.com/users/sweep3092/followers","following_url":"https://api.github.com/users/sweep3092/following{/other_user}","gists_url":"https://api.github.com/users/sweep3092/gists{/gist_id}","starred_url":"https://api.github.com/users/sweep3092/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweep3092/subscriptions","organizations_url":"https://api.github.com/users/sweep3092/orgs","repos_url":"https://api.github.com/users/sweep3092/repos","events_url":"https://api.github.com/users/sweep3092/events{/privacy}","received_events_url":"https://api.github.com/users/sweep3092/received_events","type":"User","site_admin":false},"repo":{"id":51567323,"name":"phpmentors-training-example-symfony","full_name":"sweep3092/phpmentors-training-example-symfony","owner":{"login":"sweep3092","id":5488453,"avatar_url":"https://avatars.githubusercontent.com/u/5488453?v=3","gravatar_id":"","url":"https://api.github.com/users/sweep3092","html_url":"https://github.com/sweep3092","followers_url":"https://api.github.com/users/sweep3092/followers","following_url":"https://api.github.com/users/sweep3092/following{/other_user}","gists_url":"https://api.github.com/users/sweep3092/gists{/gist_id}","starred_url":"https://api.github.com/users/sweep3092/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sweep3092/subscriptions","organizations_url":"https://api.github.com/users/sweep3092/orgs","repos_url":"https://api.github.com/users/sweep3092/repos","events_url":"https://api.github.com/users/sweep3092/events{/privacy}","received_events_url":"https://api.github.com/users/sweep3092/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sweep3092/phpmentors-training-example-symfony","description":"Symfony2ベースのユーザー登録サンプル","fork":true,"url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony","forks_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/forks","keys_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/teams","hooks_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/hooks","issue_events_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/events{/number}","events_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/events","assignees_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/assignees{/user}","branches_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/branches{/branch}","tags_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/tags","blobs_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/languages","stargazers_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/stargazers","contributors_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/contributors","subscribers_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/subscribers","subscription_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/subscription","commits_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/contents/{+path}","compare_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/merges","archive_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/downloads","issues_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues{/number}","pulls_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/labels{/name}","releases_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/releases{/id}","deployments_url":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/deployments","created_at":"2016-02-12T04:37:46Z","updated_at":"2016-02-12T04:37:47Z","pushed_at":"2016-03-10T06:28:11Z","git_url":"git://github.com/sweep3092/phpmentors-training-example-symfony.git","ssh_url":"git@github.com:sweep3092/phpmentors-training-example-symfony.git","clone_url":"https://github.com/sweep3092/phpmentors-training-example-symfony.git","svn_url":"https://github.com/sweep3092/phpmentors-training-example-symfony","homepage":"https://github.com/phpmentors-jp/phpmentors-training-example-symfony/wiki","size":620,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"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":"1.5-2.6.1"}},"_links":{"self":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1"},"html":{"href":"https://github.com/sweep3092/phpmentors-training-example-symfony/pull/1"},"issue":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/1"},"comments":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sweep3092/phpmentors-training-example-symfony/statuses/57243332ee26c27a333875c717cb04d7d4bc1a1a"}}}}