{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/30361452","id":30361452,"diff_hunk":"@@ -0,0 +1,260 @@\n+.. index::\n+   single: Bundle; Testing third party bundles\n+\n+Writing Tests for Third Party Bundles\n+=====================================\n+\n+The Standard Edition's front controller looks like this::\n+\n+    // web/app.php\n+    use Symfony\\Component\\HttpFoundation\\Request;\n+\n+    require_once __DIR__.'/../vendor/autoload.php';\n+    require_once __DIR__.'/../app/AppKernel.php';\n+\n+    // Create the request from PHP variables super globals such as $_GET, $_POST, $_SERVER, etc\n+    $request = Request::createFromGlobals();\n+\n+    // The application handles the Request\n+    $kernel = new AppKernel('prod', false);\n+    $response = $kernel->handle($request);\n+\n+    // Dump the Response's headers and print the Response's content\n+    $response->send();\n+\n+In this example, Symfony is used as an application that mimicks the HTTP protocol,\n+which means that it is possible to write transversal tests (System Tests) by building\n+\"manually\" a ``Request``, giving it to our application and then check the returned ``Response``.\n+\n+This article provides examples on how to write such tests with third party bundles.\n+\n+Creating a Minimal AppKernel\n+----------------------------\n+\n+Third party bundles cannot be ran standalone, they need an application.\n+It is possible to create a minimalistic ``AppKernel`` inside the bundle for testing\n+and showcase purposes, instead of:\n+\n+1. creating a separate application\n+2. install the bundle in it\n+3. then check how things turn out","path":"cookbook/bundles/tests.rst","position":40,"original_position":40,"commit_id":"b521478402fa13b9dd95825c58ecb5a5397fff29","original_commit_id":"b521478402fa13b9dd95825c58ecb5a5397fff29","user":{"login":"WouterJ","id":749025,"avatar_url":"https://avatars.githubusercontent.com/u/749025?v=3","gravatar_id":"","url":"https://api.github.com/users/WouterJ","html_url":"https://github.com/WouterJ","followers_url":"https://api.github.com/users/WouterJ/followers","following_url":"https://api.github.com/users/WouterJ/following{/other_user}","gists_url":"https://api.github.com/users/WouterJ/gists{/gist_id}","starred_url":"https://api.github.com/users/WouterJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WouterJ/subscriptions","organizations_url":"https://api.github.com/users/WouterJ/orgs","repos_url":"https://api.github.com/users/WouterJ/repos","events_url":"https://api.github.com/users/WouterJ/events{/privacy}","received_events_url":"https://api.github.com/users/WouterJ/received_events","type":"User","site_admin":false},"body":"reSt uses `#.` for numbered lists. Also, we normally capitialize the first word of each list item and we end it with a semi-colon (except from the last one, which ends with a full stop)","created_at":"2015-05-14T20:51:45Z","updated_at":"2015-05-14T20:51:45Z","html_url":"https://github.com/symfony/symfony-docs/pull/5232#discussion_r30361452","pull_request_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments/30361452"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/5232#discussion_r30361452"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232","id":34749949,"html_url":"https://github.com/symfony/symfony-docs/pull/5232","diff_url":"https://github.com/symfony/symfony-docs/pull/5232.diff","patch_url":"https://github.com/symfony/symfony-docs/pull/5232.patch","issue_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5232","number":5232,"state":"open","locked":false,"title":"[WIP] Added Test documentation for third party bundles","user":{"login":"gnugat","id":793185,"avatar_url":"https://avatars.githubusercontent.com/u/793185?v=3","gravatar_id":"","url":"https://api.github.com/users/gnugat","html_url":"https://github.com/gnugat","followers_url":"https://api.github.com/users/gnugat/followers","following_url":"https://api.github.com/users/gnugat/following{/other_user}","gists_url":"https://api.github.com/users/gnugat/gists{/gist_id}","starred_url":"https://api.github.com/users/gnugat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnugat/subscriptions","organizations_url":"https://api.github.com/users/gnugat/orgs","repos_url":"https://api.github.com/users/gnugat/repos","events_url":"https://api.github.com/users/gnugat/events{/privacy}","received_events_url":"https://api.github.com/users/gnugat/received_events","type":"User","site_admin":false},"body":"As discussed in #4503, I've started to rewrite an article I've published about [writing tests in third party bundles](http://gnugat.github.io/2014/10/29/sf2-bundle-standalone.html).\r\n\r\nAt this stage this PR should be considered as a Work In Progress as I'm not sure if it contains too much information (tests for third party bundles could be the subject of a whole section), not enough examples, or if it's simply irrelevant.\r\n\r\nI'd be more than happy to take any feedback :) .","created_at":"2015-05-05T17:55:19Z","updated_at":"2015-05-14T20:51:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cc0497ac6f3553f078e504eb2984eaf622ad0e1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/issues/5232/comments","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/b521478402fa13b9dd95825c58ecb5a5397fff29","head":{"label":"gnugat:third-party-bundle-app","ref":"third-party-bundle-app","sha":"b521478402fa13b9dd95825c58ecb5a5397fff29","user":{"login":"gnugat","id":793185,"avatar_url":"https://avatars.githubusercontent.com/u/793185?v=3","gravatar_id":"","url":"https://api.github.com/users/gnugat","html_url":"https://github.com/gnugat","followers_url":"https://api.github.com/users/gnugat/followers","following_url":"https://api.github.com/users/gnugat/following{/other_user}","gists_url":"https://api.github.com/users/gnugat/gists{/gist_id}","starred_url":"https://api.github.com/users/gnugat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnugat/subscriptions","organizations_url":"https://api.github.com/users/gnugat/orgs","repos_url":"https://api.github.com/users/gnugat/repos","events_url":"https://api.github.com/users/gnugat/events{/privacy}","received_events_url":"https://api.github.com/users/gnugat/received_events","type":"User","site_admin":false},"repo":{"id":35113186,"name":"symfony-docs","full_name":"gnugat/symfony-docs","owner":{"login":"gnugat","id":793185,"avatar_url":"https://avatars.githubusercontent.com/u/793185?v=3","gravatar_id":"","url":"https://api.github.com/users/gnugat","html_url":"https://github.com/gnugat","followers_url":"https://api.github.com/users/gnugat/followers","following_url":"https://api.github.com/users/gnugat/following{/other_user}","gists_url":"https://api.github.com/users/gnugat/gists{/gist_id}","starred_url":"https://api.github.com/users/gnugat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnugat/subscriptions","organizations_url":"https://api.github.com/users/gnugat/orgs","repos_url":"https://api.github.com/users/gnugat/repos","events_url":"https://api.github.com/users/gnugat/events{/privacy}","received_events_url":"https://api.github.com/users/gnugat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gnugat/symfony-docs","description":"The Symfony documentation","fork":true,"url":"https://api.github.com/repos/gnugat/symfony-docs","forks_url":"https://api.github.com/repos/gnugat/symfony-docs/forks","keys_url":"https://api.github.com/repos/gnugat/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gnugat/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gnugat/symfony-docs/teams","hooks_url":"https://api.github.com/repos/gnugat/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/gnugat/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/gnugat/symfony-docs/events","assignees_url":"https://api.github.com/repos/gnugat/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/gnugat/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/gnugat/symfony-docs/tags","blobs_url":"https://api.github.com/repos/gnugat/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gnugat/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gnugat/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gnugat/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gnugat/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/gnugat/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/gnugat/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/gnugat/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/gnugat/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/gnugat/symfony-docs/subscription","commits_url":"https://api.github.com/repos/gnugat/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gnugat/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gnugat/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gnugat/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/gnugat/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/gnugat/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gnugat/symfony-docs/merges","archive_url":"https://api.github.com/repos/gnugat/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gnugat/symfony-docs/downloads","issues_url":"https://api.github.com/repos/gnugat/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/gnugat/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/gnugat/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/gnugat/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gnugat/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/gnugat/symfony-docs/releases{/id}","created_at":"2015-05-05T17:11:21Z","updated_at":"2015-05-05T17:11:26Z","pushed_at":"2015-05-13T17:24:24Z","git_url":"git://github.com/gnugat/symfony-docs.git","ssh_url":"git@github.com:gnugat/symfony-docs.git","clone_url":"https://github.com/gnugat/symfony-docs.git","svn_url":"https://github.com/gnugat/symfony-docs","homepage":"http://symfony.com/doc","size":28576,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"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":"2.7"}},"base":{"label":"symfony:2.3","ref":"2.3","sha":"fa90e24a7491ed703ee483210e2fbd7d9bda7db2","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":521583,"name":"symfony-docs","full_name":"symfony/symfony-docs","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony-docs","description":"The Symfony documentation","fork":false,"url":"https://api.github.com/repos/symfony/symfony-docs","forks_url":"https://api.github.com/repos/symfony/symfony-docs/forks","keys_url":"https://api.github.com/repos/symfony/symfony-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony-docs/teams","hooks_url":"https://api.github.com/repos/symfony/symfony-docs/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony-docs/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony-docs/events","assignees_url":"https://api.github.com/repos/symfony/symfony-docs/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony-docs/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony-docs/tags","blobs_url":"https://api.github.com/repos/symfony/symfony-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony-docs/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony-docs/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony-docs/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony-docs/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony-docs/subscription","commits_url":"https://api.github.com/repos/symfony/symfony-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony-docs/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony-docs/merges","archive_url":"https://api.github.com/repos/symfony/symfony-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony-docs/downloads","issues_url":"https://api.github.com/repos/symfony/symfony-docs/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony-docs/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony-docs/releases{/id}","created_at":"2010-02-17T08:43:51Z","updated_at":"2015-05-14T13:12:52Z","pushed_at":"2015-05-13T20:40:20Z","git_url":"git://github.com/symfony/symfony-docs.git","ssh_url":"git@github.com:symfony/symfony-docs.git","clone_url":"https://github.com/symfony/symfony-docs.git","svn_url":"https://github.com/symfony/symfony-docs","homepage":"http://symfony.com/doc","size":64108,"stargazers_count":981,"watchers_count":981,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1842,"mirror_url":null,"open_issues_count":287,"forks":1842,"open_issues":287,"watchers":981,"default_branch":"2.7"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232"},"html":{"href":"https://github.com/symfony/symfony-docs/pull/5232"},"issue":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/5232"},"comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/issues/5232/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony-docs/pulls/5232/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony-docs/statuses/b521478402fa13b9dd95825c58ecb5a5397fff29"}}}}