File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
test/Github/Tests/Functional Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,8 @@ public function setHeaders(array $headers)
7272 public function clearHeaders ()
7373 {
7474 $ this ->headers = array (
75- sprintf ( 'Accept: application/vnd.github.%s+json ' , $ this ->options ['api_version ' ]),
76- sprintf ( 'User-Agent: %s ' , $ this ->options ['user_agent ' ]),
75+ 'Accept ' => sprintf ( ' application/vnd.github.%s+json ' , $ this ->options ['api_version ' ]),
76+ 'User-Agent ' => sprintf ( ' %s ' , $ this ->options ['user_agent ' ]),
7777 );
7878 }
7979
Original file line number Diff line number Diff line change 77 */
88class RepoTest extends TestCase
99{
10+ /**
11+ * @test
12+ */
13+ public function shouldShowPRDiffIfHeaderIsPresent ()
14+ {
15+ $ this ->client ->setHeaders (
16+ array ('Accept ' => sprintf (
17+ 'application/vnd.github.%s.diff ' ,
18+ $ this ->client ->getOption ('api_version ' )
19+ ))
20+ );
21+
22+ $ diff = $ this ->client ->api ('pull_request ' )->show ('KnpLabs ' , 'php-github-api ' , '92 ' );
23+
24+ $ this ->assertTrue ('string ' === gettype ($ diff ));
25+ }
26+
1027 /**
1128 * @test
1229 */
You can’t perform that action at this time.
0 commit comments