{"action":"created","comment":{"url":"https://api.github.com/repos/wmde/PageRetriever/pulls/comments/92200490","pull_request_review_id":12711477,"id":92200490,"diff_hunk":"@@ -156,4 +156,34 @@ public function testWhenConstructingWithInvalidFetchMode_exceptionIsThrown() {\n \t\t);\n \t}\n \n+\tpublic function testRetrieverReturnsApiResultInRawExpandedMode() {\n+\t\t$pageName = 'Raw_text';\n+\n+\t\t$this->api->method( 'isLoggedin' )->willReturn( true );\n+\t\t$this->api->method( 'postRequest' )\n+\t\t\t->with( new SimpleRequest( 'query', $this->newParamsForExpandedTemplates( $pageName ) ) )\n+\t\t\t->willReturn( $this->getJsonTestData( 'mwApiRawExpanded.json' ) );\n+\n+\t\t$expectedContent = 'No curly brackets here.';\n+\n+\t\t$this->pageRetriever = new ApiBasedPageRetriever(\n+\t\t\t$this->api,\n+\t\t\t$this->apiUser,\n+\t\t\t$this->logger,\n+\t\t\tself::PAGE_PREFIX,\n+\t\t\tApiBasedPageRetriever::MODE_RAW_EXPANDED\n+\t\t);\n+\n+\t\t$this->assertSame( $expectedContent, $this->pageRetriever->fetchPage( $pageName ) );","path":"tests/ApiBasedPageRetrieverTest.php","position":22,"original_position":22,"commit_id":"d93b96383d4ac3a940f31619503c4595293e8319","original_commit_id":"d93b96383d4ac3a940f31619503c4595293e8319","user":{"login":"JeroenDeDauw","id":146040,"avatar_url":"https://avatars.githubusercontent.com/u/146040?v=3","gravatar_id":"","url":"https://api.github.com/users/JeroenDeDauw","html_url":"https://github.com/JeroenDeDauw","followers_url":"https://api.github.com/users/JeroenDeDauw/followers","following_url":"https://api.github.com/users/JeroenDeDauw/following{/other_user}","gists_url":"https://api.github.com/users/JeroenDeDauw/gists{/gist_id}","starred_url":"https://api.github.com/users/JeroenDeDauw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeroenDeDauw/subscriptions","organizations_url":"https://api.github.com/users/JeroenDeDauw/orgs","repos_url":"https://api.github.com/users/JeroenDeDauw/repos","events_url":"https://api.github.com/users/JeroenDeDauw/events{/privacy}","received_events_url":"https://api.github.com/users/JeroenDeDauw/received_events","type":"User","site_admin":false},"body":"I'd inline $expectedContent, now there is a block of unrelated code between where it is defined and where it is used","created_at":"2016-12-13T16:03:45Z","updated_at":"2016-12-13T16:05:50Z","html_url":"https://github.com/wmde/PageRetriever/pull/4#discussion_r92200490","pull_request_url":"https://api.github.com/repos/wmde/PageRetriever/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/wmde/PageRetriever/pulls/comments/92200490"},"html":{"href":"https://github.com/wmde/PageRetriever/pull/4#discussion_r92200490"},"pull_request":{"href":"https://api.github.com/repos/wmde/PageRetriever/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/wmde/PageRetriever/pulls/4","id":97760944,"html_url":"https://github.com/wmde/PageRetriever/pull/4","diff_url":"https://github.com/wmde/PageRetriever/pull/4.diff","patch_url":"https://github.com/wmde/PageRetriever/pull/4.patch","issue_url":"https://api.github.com/repos/wmde/PageRetriever/issues/4","number":4,"state":"open","locked":false,"title":"allow fetching raw wikitext with expanded templates","user":{"login":"KaiNissen","id":5435996,"avatar_url":"https://avatars.githubusercontent.com/u/5435996?v=3","gravatar_id":"","url":"https://api.github.com/users/KaiNissen","html_url":"https://github.com/KaiNissen","followers_url":"https://api.github.com/users/KaiNissen/followers","following_url":"https://api.github.com/users/KaiNissen/following{/other_user}","gists_url":"https://api.github.com/users/KaiNissen/gists{/gist_id}","starred_url":"https://api.github.com/users/KaiNissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KaiNissen/subscriptions","organizations_url":"https://api.github.com/users/KaiNissen/orgs","repos_url":"https://api.github.com/users/KaiNissen/repos","events_url":"https://api.github.com/users/KaiNissen/events{/privacy}","received_events_url":"https://api.github.com/users/KaiNissen/received_events","type":"User","site_admin":false},"body":"We just extracted some text into templates to make it easier to change that. Since some of the pages require to be fetched in raw mode, the PageRetriever needs to support `rvexpandtemplates` when fetching raw wikitext.","created_at":"2016-12-13T14:27:43Z","updated_at":"2016-12-13T16:05:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cd61622599b3b7140f42d433fbd2a39cd80a8d8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/wmde/PageRetriever/pulls/4/commits","review_comments_url":"https://api.github.com/repos/wmde/PageRetriever/pulls/4/comments","review_comment_url":"https://api.github.com/repos/wmde/PageRetriever/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wmde/PageRetriever/issues/4/comments","statuses_url":"https://api.github.com/repos/wmde/PageRetriever/statuses/d93b96383d4ac3a940f31619503c4595293e8319","head":{"label":"wmde:raw-expand-templates","ref":"raw-expand-templates","sha":"d93b96383d4ac3a940f31619503c4595293e8319","user":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"repo":{"id":71141779,"name":"PageRetriever","full_name":"wmde/PageRetriever","owner":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wmde/PageRetriever","description":"Interface and implementations for fetching MediaWiki page content","fork":false,"url":"https://api.github.com/repos/wmde/PageRetriever","forks_url":"https://api.github.com/repos/wmde/PageRetriever/forks","keys_url":"https://api.github.com/repos/wmde/PageRetriever/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/PageRetriever/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/PageRetriever/teams","hooks_url":"https://api.github.com/repos/wmde/PageRetriever/hooks","issue_events_url":"https://api.github.com/repos/wmde/PageRetriever/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/PageRetriever/events","assignees_url":"https://api.github.com/repos/wmde/PageRetriever/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/PageRetriever/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/PageRetriever/tags","blobs_url":"https://api.github.com/repos/wmde/PageRetriever/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/PageRetriever/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/PageRetriever/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/PageRetriever/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/PageRetriever/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/PageRetriever/languages","stargazers_url":"https://api.github.com/repos/wmde/PageRetriever/stargazers","contributors_url":"https://api.github.com/repos/wmde/PageRetriever/contributors","subscribers_url":"https://api.github.com/repos/wmde/PageRetriever/subscribers","subscription_url":"https://api.github.com/repos/wmde/PageRetriever/subscription","commits_url":"https://api.github.com/repos/wmde/PageRetriever/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/PageRetriever/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/PageRetriever/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/PageRetriever/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/PageRetriever/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/PageRetriever/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/PageRetriever/merges","archive_url":"https://api.github.com/repos/wmde/PageRetriever/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/PageRetriever/downloads","issues_url":"https://api.github.com/repos/wmde/PageRetriever/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/PageRetriever/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/PageRetriever/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/PageRetriever/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/PageRetriever/labels{/name}","releases_url":"https://api.github.com/repos/wmde/PageRetriever/releases{/id}","deployments_url":"https://api.github.com/repos/wmde/PageRetriever/deployments","created_at":"2016-10-17T13:30:55Z","updated_at":"2016-10-17T13:33:24Z","pushed_at":"2016-12-13T14:28:10Z","git_url":"git://github.com/wmde/PageRetriever.git","ssh_url":"git@github.com:wmde/PageRetriever.git","clone_url":"https://github.com/wmde/PageRetriever.git","svn_url":"https://github.com/wmde/PageRetriever","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"wmde:master","ref":"master","sha":"c68950faf7cfed4ee6e51b22ff05c3c867b8f622","user":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"repo":{"id":71141779,"name":"PageRetriever","full_name":"wmde/PageRetriever","owner":{"login":"wmde","id":664724,"avatar_url":"https://avatars.githubusercontent.com/u/664724?v=3","gravatar_id":"","url":"https://api.github.com/users/wmde","html_url":"https://github.com/wmde","followers_url":"https://api.github.com/users/wmde/followers","following_url":"https://api.github.com/users/wmde/following{/other_user}","gists_url":"https://api.github.com/users/wmde/gists{/gist_id}","starred_url":"https://api.github.com/users/wmde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmde/subscriptions","organizations_url":"https://api.github.com/users/wmde/orgs","repos_url":"https://api.github.com/users/wmde/repos","events_url":"https://api.github.com/users/wmde/events{/privacy}","received_events_url":"https://api.github.com/users/wmde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wmde/PageRetriever","description":"Interface and implementations for fetching MediaWiki page content","fork":false,"url":"https://api.github.com/repos/wmde/PageRetriever","forks_url":"https://api.github.com/repos/wmde/PageRetriever/forks","keys_url":"https://api.github.com/repos/wmde/PageRetriever/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wmde/PageRetriever/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wmde/PageRetriever/teams","hooks_url":"https://api.github.com/repos/wmde/PageRetriever/hooks","issue_events_url":"https://api.github.com/repos/wmde/PageRetriever/issues/events{/number}","events_url":"https://api.github.com/repos/wmde/PageRetriever/events","assignees_url":"https://api.github.com/repos/wmde/PageRetriever/assignees{/user}","branches_url":"https://api.github.com/repos/wmde/PageRetriever/branches{/branch}","tags_url":"https://api.github.com/repos/wmde/PageRetriever/tags","blobs_url":"https://api.github.com/repos/wmde/PageRetriever/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wmde/PageRetriever/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wmde/PageRetriever/git/refs{/sha}","trees_url":"https://api.github.com/repos/wmde/PageRetriever/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wmde/PageRetriever/statuses/{sha}","languages_url":"https://api.github.com/repos/wmde/PageRetriever/languages","stargazers_url":"https://api.github.com/repos/wmde/PageRetriever/stargazers","contributors_url":"https://api.github.com/repos/wmde/PageRetriever/contributors","subscribers_url":"https://api.github.com/repos/wmde/PageRetriever/subscribers","subscription_url":"https://api.github.com/repos/wmde/PageRetriever/subscription","commits_url":"https://api.github.com/repos/wmde/PageRetriever/commits{/sha}","git_commits_url":"https://api.github.com/repos/wmde/PageRetriever/git/commits{/sha}","comments_url":"https://api.github.com/repos/wmde/PageRetriever/comments{/number}","issue_comment_url":"https://api.github.com/repos/wmde/PageRetriever/issues/comments{/number}","contents_url":"https://api.github.com/repos/wmde/PageRetriever/contents/{+path}","compare_url":"https://api.github.com/repos/wmde/PageRetriever/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wmde/PageRetriever/merges","archive_url":"https://api.github.com/repos/wmde/PageRetriever/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wmde/PageRetriever/downloads","issues_url":"https://api.github.com/repos/wmde/PageRetriever/issues{/number}","pulls_url":"https://api.github.com/repos/wmde/PageRetriever/pulls{/number}","milestones_url":"https://api.github.com/repos/wmde/PageRetriever/milestones{/number}","notifications_url":"https://api.github.com/repos/wmde/PageRetriever/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wmde/PageRetriever/labels{/name}","releases_url":"https://api.github.com/repos/wmde/PageRetriever/releases{/id}","deployments_url":"https://api.github.com/repos/wmde/PageRetriever/deployments","created_at":"2016-10-17T13:30:55Z","updated_at":"2016-10-17T13:33:24Z","pushed_at":"2016-12-13T14:28:10Z","git_url":"git://github.com/wmde/PageRetriever.git","ssh_url":"git@github.com:wmde/PageRetriever.git","clone_url":"https://github.com/wmde/PageRetriever.git","svn_url":"https://github.com/wmde/PageRetriever","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wmde/PageRetriever/pulls/4"},"html":{"href":"https://github.com/wmde/PageRetriever/pull/4"},"issue":{"href":"https://api.github.com/repos/wmde/PageRetriever/issues/4"},"comments":{"href":"https://api.github.com/repos/wmde/PageRetriever/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/wmde/PageRetriever/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/wmde/PageRetriever/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wmde/PageRetriever/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/wmde/PageRetriever/statuses/d93b96383d4ac3a940f31619503c4595293e8319"}}}}
{"actor":{"display_login":"JeroenDeDauw"}}