{"action":"created","comment":{"url":"https://api.github.com/repos/contentful/contentful.php/pulls/comments/98004459","pull_request_review_id":18411806,"id":98004459,"diff_hunk":"@@ -0,0 +1,68 @@\n+<?php\n+/**\n+ * @copyright 2015-2017 Contentful GmbH\n+ * @license   MIT\n+ */\n+\n+namespace Contentful\\Tests\\E2E;\n+\n+use Contentful\\Delivery\\Client;\n+use Contentful\\Delivery\\Query;\n+use Contentful\\ResourceArray;\n+use Contentful\\Delivery\\DynamicEntry;\n+use Contentful\\Delivery\\Asset;\n+\n+class EntryLocaleTest extends \\PHPUnit_Framework_TestCase\n+{\n+    /**\n+     * @var Client\n+     */\n+    private $client;\n+\n+    public function setUp()\n+    {\n+        $this->client = new Client('b4c0n73n7fu1', 'cfexampleapi');\n+    }\n+\n+    /**\n+     * @vcr e2e_entry_locale_get_all.json\n+     */\n+    public function testGetAll()\n+    {\n+        $query = (new Query)\n+            ->setContentType('cat')\n+            ->setLocale('*');\n+        $entries = $this->client->getEntries($query);\n+\n+        $this->assertInstanceOf(ResourceArray::class, $entries);\n+        $this->assertEquals('Nyan Cat', $entries[0]->getName());\n+    }\n+\n+    /**\n+     * @vcr e2e_entry_locale_get_en_us.json\n+     */\n+    public function testGetEnUs()\n+    {\n+        $query = (new Query)\n+            ->setContentType('cat')\n+            ->setLocale('en-US');\n+        $entries = $this->client->getEntries($query);\n+\n+        $this->assertInstanceOf(ResourceArray::class, $entries);\n+        $this->assertEquals('Nyan Cat', $entries[0]->getName());\n+    }\n+\n+    /**\n+     * @vcr e2e_entry_locale_get_tlh.json\n+     */\n+    public function testGetTlh()\n+    {\n+        $query = (new Query)\n+            ->setContentType('cat')\n+            ->setLocale('tlh');\n+        $entries = $this->client->getEntries($query);\n+\n+        $this->assertInstanceOf(ResourceArray::class, $entries);\n+        $this->assertEquals('Nyan vIghro\\'', $entries[0]->getName());","path":"tests/E2E/EntryLocaleTest.php","position":66,"original_position":66,"commit_id":"66bf3c2c23eaf022ccd2ef12c9e07d221ad7713f","original_commit_id":"66bf3c2c23eaf022ccd2ef12c9e07d221ad7713f","user":{"login":"loudmouth","id":4554909,"avatar_url":"https://avatars.githubusercontent.com/u/4554909?v=3","gravatar_id":"","url":"https://api.github.com/users/loudmouth","html_url":"https://github.com/loudmouth","followers_url":"https://api.github.com/users/loudmouth/followers","following_url":"https://api.github.com/users/loudmouth/following{/other_user}","gists_url":"https://api.github.com/users/loudmouth/gists{/gist_id}","starred_url":"https://api.github.com/users/loudmouth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loudmouth/subscriptions","organizations_url":"https://api.github.com/users/loudmouth/orgs","repos_url":"https://api.github.com/users/loudmouth/repos","events_url":"https://api.github.com/users/loudmouth/events{/privacy}","received_events_url":"https://api.github.com/users/loudmouth/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2017-01-26T14:33:54Z","updated_at":"2017-01-26T14:36:17Z","html_url":"https://github.com/contentful/contentful.php/pull/48#discussion_r98004459","pull_request_url":"https://api.github.com/repos/contentful/contentful.php/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/contentful/contentful.php/pulls/comments/98004459"},"html":{"href":"https://github.com/contentful/contentful.php/pull/48#discussion_r98004459"},"pull_request":{"href":"https://api.github.com/repos/contentful/contentful.php/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/contentful/contentful.php/pulls/48","id":103130988,"html_url":"https://github.com/contentful/contentful.php/pull/48","diff_url":"https://github.com/contentful/contentful.php/pull/48.diff","patch_url":"https://github.com/contentful/contentful.php/pull/48.patch","issue_url":"https://api.github.com/repos/contentful/contentful.php/issues/48","number":48,"state":"open","locked":false,"title":"Adds the possibility to query for a single locale.","user":{"login":"realityking","id":628508,"avatar_url":"https://avatars.githubusercontent.com/u/628508?v=3","gravatar_id":"","url":"https://api.github.com/users/realityking","html_url":"https://github.com/realityking","followers_url":"https://api.github.com/users/realityking/followers","following_url":"https://api.github.com/users/realityking/following{/other_user}","gists_url":"https://api.github.com/users/realityking/gists{/gist_id}","starred_url":"https://api.github.com/users/realityking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realityking/subscriptions","organizations_url":"https://api.github.com/users/realityking/orgs","repos_url":"https://api.github.com/users/realityking/repos","events_url":"https://api.github.com/users/realityking/events{/privacy}","received_events_url":"https://api.github.com/users/realityking/received_events","type":"User","site_admin":false},"body":"Also make it possible to specify a default locale when creating a client.\r\n\r\nThis is a major breaking change but adresses an often-requested feature. The new default\r\nbehavior is is to request content the space's default locale. To retain the old behavior\r\nset the default locale to `'*''` when created the client. This could look like this:\r\n`new Client($token, $spaceID, false, null, null, '*')`","created_at":"2017-01-25T14:39:48Z","updated_at":"2017-01-26T14:36:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2461f0eec50884ee3935cd3982e8a21d389bd760","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/contentful/contentful.php/pulls/48/commits","review_comments_url":"https://api.github.com/repos/contentful/contentful.php/pulls/48/comments","review_comment_url":"https://api.github.com/repos/contentful/contentful.php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/contentful/contentful.php/issues/48/comments","statuses_url":"https://api.github.com/repos/contentful/contentful.php/statuses/66bf3c2c23eaf022ccd2ef12c9e07d221ad7713f","head":{"label":"contentful:single-locale","ref":"single-locale","sha":"66bf3c2c23eaf022ccd2ef12c9e07d221ad7713f","user":{"login":"contentful","id":472182,"avatar_url":"https://avatars.githubusercontent.com/u/472182?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful","html_url":"https://github.com/contentful","followers_url":"https://api.github.com/users/contentful/followers","following_url":"https://api.github.com/users/contentful/following{/other_user}","gists_url":"https://api.github.com/users/contentful/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful/subscriptions","organizations_url":"https://api.github.com/users/contentful/orgs","repos_url":"https://api.github.com/users/contentful/repos","events_url":"https://api.github.com/users/contentful/events{/privacy}","received_events_url":"https://api.github.com/users/contentful/received_events","type":"Organization","site_admin":false},"repo":{"id":45910399,"name":"contentful.php","full_name":"contentful/contentful.php","owner":{"login":"contentful","id":472182,"avatar_url":"https://avatars.githubusercontent.com/u/472182?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful","html_url":"https://github.com/contentful","followers_url":"https://api.github.com/users/contentful/followers","following_url":"https://api.github.com/users/contentful/following{/other_user}","gists_url":"https://api.github.com/users/contentful/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful/subscriptions","organizations_url":"https://api.github.com/users/contentful/orgs","repos_url":"https://api.github.com/users/contentful/repos","events_url":"https://api.github.com/users/contentful/events{/privacy}","received_events_url":"https://api.github.com/users/contentful/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contentful/contentful.php","description":"Official PHP SDK for the Content Delivery API","fork":false,"url":"https://api.github.com/repos/contentful/contentful.php","forks_url":"https://api.github.com/repos/contentful/contentful.php/forks","keys_url":"https://api.github.com/repos/contentful/contentful.php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contentful/contentful.php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contentful/contentful.php/teams","hooks_url":"https://api.github.com/repos/contentful/contentful.php/hooks","issue_events_url":"https://api.github.com/repos/contentful/contentful.php/issues/events{/number}","events_url":"https://api.github.com/repos/contentful/contentful.php/events","assignees_url":"https://api.github.com/repos/contentful/contentful.php/assignees{/user}","branches_url":"https://api.github.com/repos/contentful/contentful.php/branches{/branch}","tags_url":"https://api.github.com/repos/contentful/contentful.php/tags","blobs_url":"https://api.github.com/repos/contentful/contentful.php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contentful/contentful.php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contentful/contentful.php/git/refs{/sha}","trees_url":"https://api.github.com/repos/contentful/contentful.php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contentful/contentful.php/statuses/{sha}","languages_url":"https://api.github.com/repos/contentful/contentful.php/languages","stargazers_url":"https://api.github.com/repos/contentful/contentful.php/stargazers","contributors_url":"https://api.github.com/repos/contentful/contentful.php/contributors","subscribers_url":"https://api.github.com/repos/contentful/contentful.php/subscribers","subscription_url":"https://api.github.com/repos/contentful/contentful.php/subscription","commits_url":"https://api.github.com/repos/contentful/contentful.php/commits{/sha}","git_commits_url":"https://api.github.com/repos/contentful/contentful.php/git/commits{/sha}","comments_url":"https://api.github.com/repos/contentful/contentful.php/comments{/number}","issue_comment_url":"https://api.github.com/repos/contentful/contentful.php/issues/comments{/number}","contents_url":"https://api.github.com/repos/contentful/contentful.php/contents/{+path}","compare_url":"https://api.github.com/repos/contentful/contentful.php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contentful/contentful.php/merges","archive_url":"https://api.github.com/repos/contentful/contentful.php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contentful/contentful.php/downloads","issues_url":"https://api.github.com/repos/contentful/contentful.php/issues{/number}","pulls_url":"https://api.github.com/repos/contentful/contentful.php/pulls{/number}","milestones_url":"https://api.github.com/repos/contentful/contentful.php/milestones{/number}","notifications_url":"https://api.github.com/repos/contentful/contentful.php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contentful/contentful.php/labels{/name}","releases_url":"https://api.github.com/repos/contentful/contentful.php/releases{/id}","deployments_url":"https://api.github.com/repos/contentful/contentful.php/deployments","created_at":"2015-11-10T12:27:19Z","updated_at":"2017-01-21T12:03:34Z","pushed_at":"2017-01-25T14:39:48Z","git_url":"git://github.com/contentful/contentful.php.git","ssh_url":"git@github.com:contentful/contentful.php.git","clone_url":"https://github.com/contentful/contentful.php.git","svn_url":"https://github.com/contentful/contentful.php","homepage":null,"size":1510,"stargazers_count":35,"watchers_count":35,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":10,"forks":15,"open_issues":10,"watchers":35,"default_branch":"master"}},"base":{"label":"contentful:master","ref":"master","sha":"7ac83aad2fb8c77ad7ad2e26ccf74307f05183ff","user":{"login":"contentful","id":472182,"avatar_url":"https://avatars.githubusercontent.com/u/472182?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful","html_url":"https://github.com/contentful","followers_url":"https://api.github.com/users/contentful/followers","following_url":"https://api.github.com/users/contentful/following{/other_user}","gists_url":"https://api.github.com/users/contentful/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful/subscriptions","organizations_url":"https://api.github.com/users/contentful/orgs","repos_url":"https://api.github.com/users/contentful/repos","events_url":"https://api.github.com/users/contentful/events{/privacy}","received_events_url":"https://api.github.com/users/contentful/received_events","type":"Organization","site_admin":false},"repo":{"id":45910399,"name":"contentful.php","full_name":"contentful/contentful.php","owner":{"login":"contentful","id":472182,"avatar_url":"https://avatars.githubusercontent.com/u/472182?v=3","gravatar_id":"","url":"https://api.github.com/users/contentful","html_url":"https://github.com/contentful","followers_url":"https://api.github.com/users/contentful/followers","following_url":"https://api.github.com/users/contentful/following{/other_user}","gists_url":"https://api.github.com/users/contentful/gists{/gist_id}","starred_url":"https://api.github.com/users/contentful/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/contentful/subscriptions","organizations_url":"https://api.github.com/users/contentful/orgs","repos_url":"https://api.github.com/users/contentful/repos","events_url":"https://api.github.com/users/contentful/events{/privacy}","received_events_url":"https://api.github.com/users/contentful/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/contentful/contentful.php","description":"Official PHP SDK for the Content Delivery API","fork":false,"url":"https://api.github.com/repos/contentful/contentful.php","forks_url":"https://api.github.com/repos/contentful/contentful.php/forks","keys_url":"https://api.github.com/repos/contentful/contentful.php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/contentful/contentful.php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/contentful/contentful.php/teams","hooks_url":"https://api.github.com/repos/contentful/contentful.php/hooks","issue_events_url":"https://api.github.com/repos/contentful/contentful.php/issues/events{/number}","events_url":"https://api.github.com/repos/contentful/contentful.php/events","assignees_url":"https://api.github.com/repos/contentful/contentful.php/assignees{/user}","branches_url":"https://api.github.com/repos/contentful/contentful.php/branches{/branch}","tags_url":"https://api.github.com/repos/contentful/contentful.php/tags","blobs_url":"https://api.github.com/repos/contentful/contentful.php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/contentful/contentful.php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/contentful/contentful.php/git/refs{/sha}","trees_url":"https://api.github.com/repos/contentful/contentful.php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/contentful/contentful.php/statuses/{sha}","languages_url":"https://api.github.com/repos/contentful/contentful.php/languages","stargazers_url":"https://api.github.com/repos/contentful/contentful.php/stargazers","contributors_url":"https://api.github.com/repos/contentful/contentful.php/contributors","subscribers_url":"https://api.github.com/repos/contentful/contentful.php/subscribers","subscription_url":"https://api.github.com/repos/contentful/contentful.php/subscription","commits_url":"https://api.github.com/repos/contentful/contentful.php/commits{/sha}","git_commits_url":"https://api.github.com/repos/contentful/contentful.php/git/commits{/sha}","comments_url":"https://api.github.com/repos/contentful/contentful.php/comments{/number}","issue_comment_url":"https://api.github.com/repos/contentful/contentful.php/issues/comments{/number}","contents_url":"https://api.github.com/repos/contentful/contentful.php/contents/{+path}","compare_url":"https://api.github.com/repos/contentful/contentful.php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/contentful/contentful.php/merges","archive_url":"https://api.github.com/repos/contentful/contentful.php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/contentful/contentful.php/downloads","issues_url":"https://api.github.com/repos/contentful/contentful.php/issues{/number}","pulls_url":"https://api.github.com/repos/contentful/contentful.php/pulls{/number}","milestones_url":"https://api.github.com/repos/contentful/contentful.php/milestones{/number}","notifications_url":"https://api.github.com/repos/contentful/contentful.php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/contentful/contentful.php/labels{/name}","releases_url":"https://api.github.com/repos/contentful/contentful.php/releases{/id}","deployments_url":"https://api.github.com/repos/contentful/contentful.php/deployments","created_at":"2015-11-10T12:27:19Z","updated_at":"2017-01-21T12:03:34Z","pushed_at":"2017-01-25T14:39:48Z","git_url":"git://github.com/contentful/contentful.php.git","ssh_url":"git@github.com:contentful/contentful.php.git","clone_url":"https://github.com/contentful/contentful.php.git","svn_url":"https://github.com/contentful/contentful.php","homepage":null,"size":1510,"stargazers_count":35,"watchers_count":35,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":15,"mirror_url":null,"open_issues_count":10,"forks":15,"open_issues":10,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/contentful/contentful.php/pulls/48"},"html":{"href":"https://github.com/contentful/contentful.php/pull/48"},"issue":{"href":"https://api.github.com/repos/contentful/contentful.php/issues/48"},"comments":{"href":"https://api.github.com/repos/contentful/contentful.php/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/contentful/contentful.php/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/contentful/contentful.php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/contentful/contentful.php/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/contentful/contentful.php/statuses/66bf3c2c23eaf022ccd2ef12c9e07d221ad7713f"}}}}
{"actor":{"display_login":"loudmouth"}}