File tree 2 files changed +19
-1
lines changed
test/Github/Tests/Functional 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public function configure($bodyType = null)
15
15
{
16
16
if ('raw ' == $ bodyType ) {
17
17
$ this ->client ->setHeaders (array (
18
- sprintf ( 'Accept: application/vnd.github.%s.raw ' , $ this ->client ->getOption ('api_version ' ))
18
+ 'Accept ' => sprintf ( ' application/vnd.github.%s.raw ' , $ this ->client ->getOption ('api_version ' ))
19
19
));
20
20
}
21
21
}
Original file line number Diff line number Diff line change @@ -24,6 +24,24 @@ public function shouldShowPRDiffIfHeaderIsPresent()
24
24
$ this ->assertTrue ('string ' === gettype ($ diff ));
25
25
}
26
26
27
+ /**
28
+ * @test
29
+ */
30
+ public function shouldRetrieveRawBlob ()
31
+ {
32
+ $ api = $ this ->client ->api ('git_data ' )->blobs ();
33
+ $ api ->configure ('raw ' );
34
+
35
+ $ contents = $ api ->show (
36
+ 'KnpLabs ' ,
37
+ 'php-github-api ' ,
38
+ 'e50d5e946385cff052636e2f09f36b03d1c368f4 '
39
+ );
40
+
41
+ $ this ->assertInternalType ('string ' , $ contents );
42
+ $ this ->assertStringStartsWith ('<?php ' , $ contents );
43
+ }
44
+
27
45
/**
28
46
* @test
29
47
*/
You can’t perform that action at this time.
0 commit comments