{"action":"created","comment":{"url":"https://api.github.com/repos/poledev/mathieu/pulls/comments/31545297","id":31545297,"diff_hunk":"@@ -0,0 +1,59 @@\n+<?php\n+namespace SensioLabs\\JobBoardBundle\\Tests\\Controller;\n+\n+use SensioLabs\\JobBoardBundle\\Entity\\Job;\n+use Symfony\\Bundle\\FrameworkBundle\\Test\\WebTestCase;\n+\n+/**\n+ * {@inheritDoc}\n+ */\n+class BaseControllerTest extends WebTestCase\n+{\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public function testPostWithBadValuesAction()\n+    {\n+        $client     = static::createClient();\n+        $crawler    = $client->request('GET', $client->getContainer()->get('router')->generate('job_post'));\n+\n+        $this->assertEquals(200, $client->getResponse()->getStatusCode());\n+\n+        $form = $crawler->selectButton('Preview')->form([\n+            'sensiolabs_jobboardbundle_job[description]' => 'short description'\n+        ]);\n+\n+        $crawler = $client->submit($form);\n+\n+        $this->assertEquals(1, $crawler->filter(\"html:contains('Job title should not be empty')\")->count());\n+        $this->assertEquals(1, $crawler->filter(\"html:contains('Your job offer must be longer')\")->count());\n+        $this->assertEquals(1, $crawler->filter(\"html:contains('Contract must be selected')\")->count());\n+        $this->assertEquals(1, $crawler->filter(\"html:contains('Company should not be empty')\")->count());\n+        $this->assertEquals(1, $crawler->filter(\"html:contains('Country should not be empty')\")->count());\n+        $this->assertEquals(1, $crawler->filter(\"html:contains('City should not be empty')\")->count());\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public function testPostAction()\n+    {\n+        $client     = static::createClient();\n+        $crawler    = $client->request('GET', $client->getContainer()->get('router')->generate('job_post'));\n+\n+        $form = $crawler->selectButton('Preview')->form([\n+            'sensiolabs_jobboardbundle_job[description]'    => 'Fusce convallis sollicitudin aliquet. Phasellus volutpat in velit ac gravida. Mauris nec erat felis. Pellentesque scelerisque cursus libero',\n+            'sensiolabs_jobboardbundle_job[title]'          => 'Developer syfony',\n+            'sensiolabs_jobboardbundle_job[contract]'       => Job::C_INTERNSHIP,\n+            'sensiolabs_jobboardbundle_job[company]'        => 'SensioLabs',\n+            'sensiolabs_jobboardbundle_job[city]'           => 'Clichy',\n+            'sensiolabs_jobboardbundle_job[country]'        => 'FR',\n+            'sensiolabs_jobboardbundle_job[howToApply]'     => 'mathieu.marchois@sensiolabs.com',\n+        ]);\n+\n+        $client->submit($form);\n+        $client->followRedirect();","path":"src/SensioLabs/JobBoardBundle/Tests/Controller/BaseControllerTest.php","position":55,"original_position":55,"commit_id":"2c28876031d5acb4a05a8cb49721c691d8542774","original_commit_id":"65760323633a11e5168f3924fafc9e1d7a6e7d8d","user":{"login":"florianbelhomme","id":4208880,"avatar_url":"https://avatars.githubusercontent.com/u/4208880?v=3","gravatar_id":"","url":"https://api.github.com/users/florianbelhomme","html_url":"https://github.com/florianbelhomme","followers_url":"https://api.github.com/users/florianbelhomme/followers","following_url":"https://api.github.com/users/florianbelhomme/following{/other_user}","gists_url":"https://api.github.com/users/florianbelhomme/gists{/gist_id}","starred_url":"https://api.github.com/users/florianbelhomme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianbelhomme/subscriptions","organizations_url":"https://api.github.com/users/florianbelhomme/orgs","repos_url":"https://api.github.com/users/florianbelhomme/repos","events_url":"https://api.github.com/users/florianbelhomme/events{/privacy}","received_events_url":"https://api.github.com/users/florianbelhomme/received_events","type":"User","site_admin":false},"body":"A la fin, le \"succès\" du formulaire est la redirection, tu devrais tester si le retour est une redirection et si elle va sur la bonne page","created_at":"2015-06-02T17:02:47Z","updated_at":"2015-06-02T17:02:47Z","html_url":"https://github.com/poledev/mathieu/pull/22#discussion_r31545297","pull_request_url":"https://api.github.com/repos/poledev/mathieu/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/poledev/mathieu/pulls/comments/31545297"},"html":{"href":"https://github.com/poledev/mathieu/pull/22#discussion_r31545297"},"pull_request":{"href":"https://api.github.com/repos/poledev/mathieu/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/poledev/mathieu/pulls/22","id":36735056,"html_url":"https://github.com/poledev/mathieu/pull/22","diff_url":"https://github.com/poledev/mathieu/pull/22.diff","patch_url":"https://github.com/poledev/mathieu/pull/22.patch","issue_url":"https://api.github.com/repos/poledev/mathieu/issues/22","number":22,"state":"open","locked":false,"title":"Issue 01","user":{"login":"mmarchois","id":2683379,"avatar_url":"https://avatars.githubusercontent.com/u/2683379?v=3","gravatar_id":"","url":"https://api.github.com/users/mmarchois","html_url":"https://github.com/mmarchois","followers_url":"https://api.github.com/users/mmarchois/followers","following_url":"https://api.github.com/users/mmarchois/following{/other_user}","gists_url":"https://api.github.com/users/mmarchois/gists{/gist_id}","starred_url":"https://api.github.com/users/mmarchois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmarchois/subscriptions","organizations_url":"https://api.github.com/users/mmarchois/orgs","repos_url":"https://api.github.com/users/mmarchois/repos","events_url":"https://api.github.com/users/mmarchois/events{/privacy}","received_events_url":"https://api.github.com/users/mmarchois/received_events","type":"User","site_admin":false},"body":"PR issue-01","created_at":"2015-06-02T14:34:50Z","updated_at":"2015-06-02T17:02:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"049af01cd35fc70a97bd71afd37a2cf73e55be85","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/poledev/mathieu/pulls/22/commits","review_comments_url":"https://api.github.com/repos/poledev/mathieu/pulls/22/comments","review_comment_url":"https://api.github.com/repos/poledev/mathieu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/poledev/mathieu/issues/22/comments","statuses_url":"https://api.github.com/repos/poledev/mathieu/statuses/2c28876031d5acb4a05a8cb49721c691d8542774","head":{"label":"poledev:issue-01","ref":"issue-01","sha":"2c28876031d5acb4a05a8cb49721c691d8542774","user":{"login":"poledev","id":6369679,"avatar_url":"https://avatars.githubusercontent.com/u/6369679?v=3","gravatar_id":"","url":"https://api.github.com/users/poledev","html_url":"https://github.com/poledev","followers_url":"https://api.github.com/users/poledev/followers","following_url":"https://api.github.com/users/poledev/following{/other_user}","gists_url":"https://api.github.com/users/poledev/gists{/gist_id}","starred_url":"https://api.github.com/users/poledev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poledev/subscriptions","organizations_url":"https://api.github.com/users/poledev/orgs","repos_url":"https://api.github.com/users/poledev/repos","events_url":"https://api.github.com/users/poledev/events{/privacy}","received_events_url":"https://api.github.com/users/poledev/received_events","type":"Organization","site_admin":false},"repo":{"id":36651258,"name":"mathieu","full_name":"poledev/mathieu","owner":{"login":"poledev","id":6369679,"avatar_url":"https://avatars.githubusercontent.com/u/6369679?v=3","gravatar_id":"","url":"https://api.github.com/users/poledev","html_url":"https://github.com/poledev","followers_url":"https://api.github.com/users/poledev/followers","following_url":"https://api.github.com/users/poledev/following{/other_user}","gists_url":"https://api.github.com/users/poledev/gists{/gist_id}","starred_url":"https://api.github.com/users/poledev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poledev/subscriptions","organizations_url":"https://api.github.com/users/poledev/orgs","repos_url":"https://api.github.com/users/poledev/repos","events_url":"https://api.github.com/users/poledev/events{/privacy}","received_events_url":"https://api.github.com/users/poledev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poledev/mathieu","description":null,"fork":false,"url":"https://api.github.com/repos/poledev/mathieu","forks_url":"https://api.github.com/repos/poledev/mathieu/forks","keys_url":"https://api.github.com/repos/poledev/mathieu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poledev/mathieu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poledev/mathieu/teams","hooks_url":"https://api.github.com/repos/poledev/mathieu/hooks","issue_events_url":"https://api.github.com/repos/poledev/mathieu/issues/events{/number}","events_url":"https://api.github.com/repos/poledev/mathieu/events","assignees_url":"https://api.github.com/repos/poledev/mathieu/assignees{/user}","branches_url":"https://api.github.com/repos/poledev/mathieu/branches{/branch}","tags_url":"https://api.github.com/repos/poledev/mathieu/tags","blobs_url":"https://api.github.com/repos/poledev/mathieu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poledev/mathieu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poledev/mathieu/git/refs{/sha}","trees_url":"https://api.github.com/repos/poledev/mathieu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poledev/mathieu/statuses/{sha}","languages_url":"https://api.github.com/repos/poledev/mathieu/languages","stargazers_url":"https://api.github.com/repos/poledev/mathieu/stargazers","contributors_url":"https://api.github.com/repos/poledev/mathieu/contributors","subscribers_url":"https://api.github.com/repos/poledev/mathieu/subscribers","subscription_url":"https://api.github.com/repos/poledev/mathieu/subscription","commits_url":"https://api.github.com/repos/poledev/mathieu/commits{/sha}","git_commits_url":"https://api.github.com/repos/poledev/mathieu/git/commits{/sha}","comments_url":"https://api.github.com/repos/poledev/mathieu/comments{/number}","issue_comment_url":"https://api.github.com/repos/poledev/mathieu/issues/comments{/number}","contents_url":"https://api.github.com/repos/poledev/mathieu/contents/{+path}","compare_url":"https://api.github.com/repos/poledev/mathieu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poledev/mathieu/merges","archive_url":"https://api.github.com/repos/poledev/mathieu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poledev/mathieu/downloads","issues_url":"https://api.github.com/repos/poledev/mathieu/issues{/number}","pulls_url":"https://api.github.com/repos/poledev/mathieu/pulls{/number}","milestones_url":"https://api.github.com/repos/poledev/mathieu/milestones{/number}","notifications_url":"https://api.github.com/repos/poledev/mathieu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poledev/mathieu/labels{/name}","releases_url":"https://api.github.com/repos/poledev/mathieu/releases{/id}","created_at":"2015-06-01T09:37:39Z","updated_at":"2015-06-01T09:39:33Z","pushed_at":"2015-06-02T16:33:32Z","git_url":"git://github.com/poledev/mathieu.git","ssh_url":"git@github.com:poledev/mathieu.git","clone_url":"https://github.com/poledev/mathieu.git","svn_url":"https://github.com/poledev/mathieu","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"base":{"label":"poledev:master","ref":"master","sha":"d6bdb5ff0e8696582a91582cccd408fcaebe3aa7","user":{"login":"poledev","id":6369679,"avatar_url":"https://avatars.githubusercontent.com/u/6369679?v=3","gravatar_id":"","url":"https://api.github.com/users/poledev","html_url":"https://github.com/poledev","followers_url":"https://api.github.com/users/poledev/followers","following_url":"https://api.github.com/users/poledev/following{/other_user}","gists_url":"https://api.github.com/users/poledev/gists{/gist_id}","starred_url":"https://api.github.com/users/poledev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poledev/subscriptions","organizations_url":"https://api.github.com/users/poledev/orgs","repos_url":"https://api.github.com/users/poledev/repos","events_url":"https://api.github.com/users/poledev/events{/privacy}","received_events_url":"https://api.github.com/users/poledev/received_events","type":"Organization","site_admin":false},"repo":{"id":36651258,"name":"mathieu","full_name":"poledev/mathieu","owner":{"login":"poledev","id":6369679,"avatar_url":"https://avatars.githubusercontent.com/u/6369679?v=3","gravatar_id":"","url":"https://api.github.com/users/poledev","html_url":"https://github.com/poledev","followers_url":"https://api.github.com/users/poledev/followers","following_url":"https://api.github.com/users/poledev/following{/other_user}","gists_url":"https://api.github.com/users/poledev/gists{/gist_id}","starred_url":"https://api.github.com/users/poledev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poledev/subscriptions","organizations_url":"https://api.github.com/users/poledev/orgs","repos_url":"https://api.github.com/users/poledev/repos","events_url":"https://api.github.com/users/poledev/events{/privacy}","received_events_url":"https://api.github.com/users/poledev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poledev/mathieu","description":null,"fork":false,"url":"https://api.github.com/repos/poledev/mathieu","forks_url":"https://api.github.com/repos/poledev/mathieu/forks","keys_url":"https://api.github.com/repos/poledev/mathieu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poledev/mathieu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poledev/mathieu/teams","hooks_url":"https://api.github.com/repos/poledev/mathieu/hooks","issue_events_url":"https://api.github.com/repos/poledev/mathieu/issues/events{/number}","events_url":"https://api.github.com/repos/poledev/mathieu/events","assignees_url":"https://api.github.com/repos/poledev/mathieu/assignees{/user}","branches_url":"https://api.github.com/repos/poledev/mathieu/branches{/branch}","tags_url":"https://api.github.com/repos/poledev/mathieu/tags","blobs_url":"https://api.github.com/repos/poledev/mathieu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poledev/mathieu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poledev/mathieu/git/refs{/sha}","trees_url":"https://api.github.com/repos/poledev/mathieu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poledev/mathieu/statuses/{sha}","languages_url":"https://api.github.com/repos/poledev/mathieu/languages","stargazers_url":"https://api.github.com/repos/poledev/mathieu/stargazers","contributors_url":"https://api.github.com/repos/poledev/mathieu/contributors","subscribers_url":"https://api.github.com/repos/poledev/mathieu/subscribers","subscription_url":"https://api.github.com/repos/poledev/mathieu/subscription","commits_url":"https://api.github.com/repos/poledev/mathieu/commits{/sha}","git_commits_url":"https://api.github.com/repos/poledev/mathieu/git/commits{/sha}","comments_url":"https://api.github.com/repos/poledev/mathieu/comments{/number}","issue_comment_url":"https://api.github.com/repos/poledev/mathieu/issues/comments{/number}","contents_url":"https://api.github.com/repos/poledev/mathieu/contents/{+path}","compare_url":"https://api.github.com/repos/poledev/mathieu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poledev/mathieu/merges","archive_url":"https://api.github.com/repos/poledev/mathieu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poledev/mathieu/downloads","issues_url":"https://api.github.com/repos/poledev/mathieu/issues{/number}","pulls_url":"https://api.github.com/repos/poledev/mathieu/pulls{/number}","milestones_url":"https://api.github.com/repos/poledev/mathieu/milestones{/number}","notifications_url":"https://api.github.com/repos/poledev/mathieu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poledev/mathieu/labels{/name}","releases_url":"https://api.github.com/repos/poledev/mathieu/releases{/id}","created_at":"2015-06-01T09:37:39Z","updated_at":"2015-06-01T09:39:33Z","pushed_at":"2015-06-02T16:33:32Z","git_url":"git://github.com/poledev/mathieu.git","ssh_url":"git@github.com:poledev/mathieu.git","clone_url":"https://github.com/poledev/mathieu.git","svn_url":"https://github.com/poledev/mathieu","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":23,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/poledev/mathieu/pulls/22"},"html":{"href":"https://github.com/poledev/mathieu/pull/22"},"issue":{"href":"https://api.github.com/repos/poledev/mathieu/issues/22"},"comments":{"href":"https://api.github.com/repos/poledev/mathieu/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/poledev/mathieu/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/poledev/mathieu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/poledev/mathieu/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/poledev/mathieu/statuses/2c28876031d5acb4a05a8cb49721c691d8542774"}}}}