File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
test/Github/Tests/Functional Expand file tree Collapse file tree 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)
1515 {
1616 if ('raw ' == $ bodyType ) {
1717 $ 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 ' ))
1919 ));
2020 }
2121 }
Original file line number Diff line number Diff line change @@ -24,6 +24,24 @@ public function shouldShowPRDiffIfHeaderIsPresent()
2424 $ this ->assertTrue ('string ' === gettype ($ diff ));
2525 }
2626
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+
2745 /**
2846 * @test
2947 */
You can’t perform that action at this time.
0 commit comments