File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,11 @@ public function fork($id)
54
54
return $ this ->post ('gists/ ' .rawurlencode ($ id ).'/fork ' );
55
55
}
56
56
57
+ public function forks ($ id )
58
+ {
59
+ return $ this ->get ('gists/ ' .rawurlencode ($ id ).'/forks ' );
60
+ }
61
+
57
62
public function remove ($ id )
58
63
{
59
64
return $ this ->delete ('gists/ ' .rawurlencode ($ id ));
Original file line number Diff line number Diff line change @@ -94,6 +94,22 @@ public function shouldForkGist()
94
94
$ this ->assertEquals ($ expectedArray , $ api ->fork (123 ));
95
95
}
96
96
97
+ /**
98
+ * @test
99
+ */
100
+ public function shouldListGistForks ()
101
+ {
102
+ $ expectedArray = array ('id ' => '123 ' );
103
+
104
+ $ api = $ this ->getApiMock ();
105
+ $ api ->expects ($ this ->once ())
106
+ ->method ('post ' )
107
+ ->with ('gists/123/forks ' )
108
+ ->will ($ this ->returnValue ($ expectedArray ));
109
+
110
+ $ api ->forks (123 );
111
+ }
112
+
97
113
/**
98
114
* @test
99
115
* @expectedException Github\Exception\MissingArgumentException
You can’t perform that action at this time.
0 commit comments