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)
72
72
public function clearHeaders ()
73
73
{
74
74
$ 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 ' ]),
77
77
);
78
78
}
79
79
Original file line number Diff line number Diff line change 7
7
*/
8
8
class RepoTest extends TestCase
9
9
{
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
+
10
27
/**
11
28
* @test
12
29
*/
You can’t perform that action at this time.
0 commit comments