{"action":"created","comment":{"url":"https://api.github.com/repos/Codeception/Codeception/pulls/comments/48308353","id":48308353,"diff_hunk":"@@ -1501,4 +1501,35 @@ protected function debugCookieJar()\n         $cookieStrings = array_map('strval', $cookies);\n         $this->debugSection('Cookie Jar', $cookieStrings);\n     }\n+\n+    protected function setCookiesFromOptions()\n+    {\n+        if (isset($this->config['cookies']) && is_array($this->config['cookies']) && !empty($this->config['cookies'])) {\n+\n+            $domain = parse_url($this->config['url'], PHP_URL_HOST);\n+            $cookieJar = $this->client->getCookieJar();\n+            foreach ($this->config['cookies'] as &$cookie) {\n+                if (!is_array($cookie) || !array_key_exists('Name', $cookie) || !array_key_exists('Value', $cookie)) {\n+                    throw new \\InvalidArgumentException('Cookies must have at least Name and Value attributes');\n+                }\n+                if (!isset($cookie['Domain'])) {\n+                    $cookie['Domain'] = $domain;\n+                }\n+                if (!isset($cookie['Expires'])) {\n+                    $cookie['Expires'] = null;\n+                }\n+                if (!isset($cookie['Path'])) {\n+                    $cookie['Path'] = '/';\n+                }\n+                if (!isset($cookie['Secure'])) {\n+                    $cookie['Secure'] = false;\n+                }\n+                if (!isset($cookie['HttpOnly'])) {\n+                    $cookie['HttpOnly'] = false;\n+                }\n+                $cookieJar->set(new \\Symfony\\Component\\BrowserKit\\Cookie($cookie['Name'], $cookie['Value'],\n+                    $cookie['Expires'], $cookie['Path'], $cookie['Domain'], $cookie['Secure'], $cookie['HttpOnly']));","path":"src/Codeception/Lib/InnerBrowser.php","position":31,"original_position":31,"commit_id":"389dcdf543a0d59c3abbfd10479800353883f224","original_commit_id":"389dcdf543a0d59c3abbfd10479800353883f224","user":{"login":"Nitpick-CI","id":12626182,"avatar_url":"https://avatars.githubusercontent.com/u/12626182?v=3","gravatar_id":"","url":"https://api.github.com/users/Nitpick-CI","html_url":"https://github.com/Nitpick-CI","followers_url":"https://api.github.com/users/Nitpick-CI/followers","following_url":"https://api.github.com/users/Nitpick-CI/following{/other_user}","gists_url":"https://api.github.com/users/Nitpick-CI/gists{/gist_id}","starred_url":"https://api.github.com/users/Nitpick-CI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nitpick-CI/subscriptions","organizations_url":"https://api.github.com/users/Nitpick-CI/orgs","repos_url":"https://api.github.com/users/Nitpick-CI/repos","events_url":"https://api.github.com/users/Nitpick-CI/events{/privacy}","received_events_url":"https://api.github.com/users/Nitpick-CI/received_events","type":"User","site_admin":false},"body":"- Multi-line function call not indented correctly; expected 16 spaces but found 20\n- Only one argument is allowed per line in a multi-line function call\n- Closing parenthesis of a multi-line function call must be on a line by itself\n","created_at":"2015-12-22T23:01:09Z","updated_at":"2015-12-22T23:01:09Z","html_url":"https://github.com/Codeception/Codeception/pull/2657#discussion_r48308353","pull_request_url":"https://api.github.com/repos/Codeception/Codeception/pulls/2657","_links":{"self":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/comments/48308353"},"html":{"href":"https://github.com/Codeception/Codeception/pull/2657#discussion_r48308353"},"pull_request":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2657"}}},"pull_request":{"url":"https://api.github.com/repos/Codeception/Codeception/pulls/2657","id":54424969,"html_url":"https://github.com/Codeception/Codeception/pull/2657","diff_url":"https://github.com/Codeception/Codeception/pull/2657.diff","patch_url":"https://github.com/Codeception/Codeception/pull/2657.patch","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/2657","number":2657,"state":"open","locked":false,"title":"PhpBrowser: Fixed cookies option by setting cookies to BrowserKit's CookieJar #2653","user":{"login":"Naktibalda","id":395992,"avatar_url":"https://avatars.githubusercontent.com/u/395992?v=3","gravatar_id":"","url":"https://api.github.com/users/Naktibalda","html_url":"https://github.com/Naktibalda","followers_url":"https://api.github.com/users/Naktibalda/followers","following_url":"https://api.github.com/users/Naktibalda/following{/other_user}","gists_url":"https://api.github.com/users/Naktibalda/gists{/gist_id}","starred_url":"https://api.github.com/users/Naktibalda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naktibalda/subscriptions","organizations_url":"https://api.github.com/users/Naktibalda/orgs","repos_url":"https://api.github.com/users/Naktibalda/repos","events_url":"https://api.github.com/users/Naktibalda/events{/privacy}","received_events_url":"https://api.github.com/users/Naktibalda/received_events","type":"User","site_admin":false},"body":"BrowserKit's CookieJar overrides Guzzle's, so I decided to use it instead of passing `cookies` option to Guzzle.\r\n\r\n`setCookiesFromOptions` method can be used in framework modules, if there is a wish to add `cookies` option to them.","created_at":"2015-12-22T23:00:58Z","updated_at":"2015-12-22T23:01:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"12944190f3796b6e8331ad7bf0dc7aa1e6bd9dca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Codeception/Codeception/pulls/2657/commits","review_comments_url":"https://api.github.com/repos/Codeception/Codeception/pulls/2657/comments","review_comment_url":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/2657/comments","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/389dcdf543a0d59c3abbfd10479800353883f224","head":{"label":"Naktibalda:issue-2653","ref":"issue-2653","sha":"389dcdf543a0d59c3abbfd10479800353883f224","user":{"login":"Naktibalda","id":395992,"avatar_url":"https://avatars.githubusercontent.com/u/395992?v=3","gravatar_id":"","url":"https://api.github.com/users/Naktibalda","html_url":"https://github.com/Naktibalda","followers_url":"https://api.github.com/users/Naktibalda/followers","following_url":"https://api.github.com/users/Naktibalda/following{/other_user}","gists_url":"https://api.github.com/users/Naktibalda/gists{/gist_id}","starred_url":"https://api.github.com/users/Naktibalda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naktibalda/subscriptions","organizations_url":"https://api.github.com/users/Naktibalda/orgs","repos_url":"https://api.github.com/users/Naktibalda/repos","events_url":"https://api.github.com/users/Naktibalda/events{/privacy}","received_events_url":"https://api.github.com/users/Naktibalda/received_events","type":"User","site_admin":false},"repo":{"id":35227251,"name":"Codeception","full_name":"Naktibalda/Codeception","owner":{"login":"Naktibalda","id":395992,"avatar_url":"https://avatars.githubusercontent.com/u/395992?v=3","gravatar_id":"","url":"https://api.github.com/users/Naktibalda","html_url":"https://github.com/Naktibalda","followers_url":"https://api.github.com/users/Naktibalda/followers","following_url":"https://api.github.com/users/Naktibalda/following{/other_user}","gists_url":"https://api.github.com/users/Naktibalda/gists{/gist_id}","starred_url":"https://api.github.com/users/Naktibalda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Naktibalda/subscriptions","organizations_url":"https://api.github.com/users/Naktibalda/orgs","repos_url":"https://api.github.com/users/Naktibalda/repos","events_url":"https://api.github.com/users/Naktibalda/events{/privacy}","received_events_url":"https://api.github.com/users/Naktibalda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Naktibalda/Codeception","description":"Full-stack testing PHP framework","fork":true,"url":"https://api.github.com/repos/Naktibalda/Codeception","forks_url":"https://api.github.com/repos/Naktibalda/Codeception/forks","keys_url":"https://api.github.com/repos/Naktibalda/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Naktibalda/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Naktibalda/Codeception/teams","hooks_url":"https://api.github.com/repos/Naktibalda/Codeception/hooks","issue_events_url":"https://api.github.com/repos/Naktibalda/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/Naktibalda/Codeception/events","assignees_url":"https://api.github.com/repos/Naktibalda/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/Naktibalda/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/Naktibalda/Codeception/tags","blobs_url":"https://api.github.com/repos/Naktibalda/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Naktibalda/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Naktibalda/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/Naktibalda/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Naktibalda/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/Naktibalda/Codeception/languages","stargazers_url":"https://api.github.com/repos/Naktibalda/Codeception/stargazers","contributors_url":"https://api.github.com/repos/Naktibalda/Codeception/contributors","subscribers_url":"https://api.github.com/repos/Naktibalda/Codeception/subscribers","subscription_url":"https://api.github.com/repos/Naktibalda/Codeception/subscription","commits_url":"https://api.github.com/repos/Naktibalda/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/Naktibalda/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/Naktibalda/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/Naktibalda/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/Naktibalda/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/Naktibalda/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Naktibalda/Codeception/merges","archive_url":"https://api.github.com/repos/Naktibalda/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Naktibalda/Codeception/downloads","issues_url":"https://api.github.com/repos/Naktibalda/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/Naktibalda/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/Naktibalda/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/Naktibalda/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Naktibalda/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/Naktibalda/Codeception/releases{/id}","created_at":"2015-05-07T15:14:58Z","updated_at":"2015-05-07T15:15:00Z","pushed_at":"2015-12-22T22:57:39Z","git_url":"git://github.com/Naktibalda/Codeception.git","ssh_url":"git@github.com:Naktibalda/Codeception.git","clone_url":"https://github.com/Naktibalda/Codeception.git","svn_url":"https://github.com/Naktibalda/Codeception","homepage":"http://codeception.com","size":55582,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.1"}},"base":{"label":"Codeception:2.1","ref":"2.1","sha":"4ee562f421fd404139dd7b73ae46d075396a4baf","user":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"repo":{"id":2880469,"name":"Codeception","full_name":"Codeception/Codeception","owner":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Codeception/Codeception","description":"Full-stack testing PHP framework","fork":false,"url":"https://api.github.com/repos/Codeception/Codeception","forks_url":"https://api.github.com/repos/Codeception/Codeception/forks","keys_url":"https://api.github.com/repos/Codeception/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Codeception/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Codeception/Codeception/teams","hooks_url":"https://api.github.com/repos/Codeception/Codeception/hooks","issue_events_url":"https://api.github.com/repos/Codeception/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/Codeception/Codeception/events","assignees_url":"https://api.github.com/repos/Codeception/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/Codeception/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/Codeception/Codeception/tags","blobs_url":"https://api.github.com/repos/Codeception/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Codeception/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Codeception/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/Codeception/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/Codeception/Codeception/languages","stargazers_url":"https://api.github.com/repos/Codeception/Codeception/stargazers","contributors_url":"https://api.github.com/repos/Codeception/Codeception/contributors","subscribers_url":"https://api.github.com/repos/Codeception/Codeception/subscribers","subscription_url":"https://api.github.com/repos/Codeception/Codeception/subscription","commits_url":"https://api.github.com/repos/Codeception/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/Codeception/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/Codeception/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/Codeception/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/Codeception/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/Codeception/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Codeception/Codeception/merges","archive_url":"https://api.github.com/repos/Codeception/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Codeception/Codeception/downloads","issues_url":"https://api.github.com/repos/Codeception/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/Codeception/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/Codeception/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/Codeception/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Codeception/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/Codeception/Codeception/releases{/id}","created_at":"2011-11-30T04:06:44Z","updated_at":"2015-12-22T17:07:30Z","pushed_at":"2015-12-22T23:00:58Z","git_url":"git://github.com/Codeception/Codeception.git","ssh_url":"git@github.com:Codeception/Codeception.git","clone_url":"https://github.com/Codeception/Codeception.git","svn_url":"https://github.com/Codeception/Codeception","homepage":"http://codeception.com","size":56808,"stargazers_count":1901,"watchers_count":1901,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":725,"mirror_url":null,"open_issues_count":257,"forks":725,"open_issues":257,"watchers":1901,"default_branch":"2.1"}},"_links":{"self":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2657"},"html":{"href":"https://github.com/Codeception/Codeception/pull/2657"},"issue":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/2657"},"comments":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/2657/comments"},"review_comments":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2657/comments"},"review_comment":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/2657/commits"},"statuses":{"href":"https://api.github.com/repos/Codeception/Codeception/statuses/389dcdf543a0d59c3abbfd10479800353883f224"}}}}