@@ -233,7 +233,7 @@ public function shouldFetchTarballArchiveWhenFormatNotRecognized()
233233 $ api = $ this ->getApiMock ();
234234 $ api ->expects ($ this ->once ())
235235 ->method ('get ' )
236- ->with ('repos/KnpLabs/php-github-api/tarball ' , array ( ' ref ' => null ) )
236+ ->with ('repos/KnpLabs/php-github-api/tarball ' )
237237 ->will ($ this ->returnValue ($ expectedValue ));
238238
239239 $ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'someFormat ' ));
@@ -249,7 +249,7 @@ public function shouldFetchTarballArchive()
249249 $ api = $ this ->getApiMock ();
250250 $ api ->expects ($ this ->once ())
251251 ->method ('get ' )
252- ->with ('repos/KnpLabs/php-github-api/tarball ' , array ( ' ref ' => null ) )
252+ ->with ('repos/KnpLabs/php-github-api/tarball ' )
253253 ->will ($ this ->returnValue ($ expectedValue ));
254254
255255 $ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'tarball ' ));
@@ -265,12 +265,28 @@ public function shouldFetchZipballArchive()
265265 $ api = $ this ->getApiMock ();
266266 $ api ->expects ($ this ->once ())
267267 ->method ('get ' )
268- ->with ('repos/KnpLabs/php-github-api/zipball ' , array ( ' ref ' => null ) )
268+ ->with ('repos/KnpLabs/php-github-api/zipball ' )
269269 ->will ($ this ->returnValue ($ expectedValue ));
270270
271271 $ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'zipball ' ));
272272 }
273273
274+ /**
275+ * @test
276+ */
277+ public function shouldFetchZipballArchiveByReference ()
278+ {
279+ $ expectedValue = 'zip ' ;
280+
281+ $ api = $ this ->getApiMock ();
282+ $ api ->expects ($ this ->once ())
283+ ->method ('get ' )
284+ ->with ('repos/KnpLabs/php-github-api/zipball/master ' )
285+ ->will ($ this ->returnValue ($ expectedValue ));
286+
287+ $ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'zipball ' , 'master ' ));
288+ }
289+
274290 /**
275291 * @test
276292 */
0 commit comments