@@ -233,7 +233,7 @@ public function shouldFetchTarballArchiveWhenFormatNotRecognized()
233
233
$ api = $ this ->getApiMock ();
234
234
$ api ->expects ($ this ->once ())
235
235
->method ('get ' )
236
- ->with ('repos/KnpLabs/php-github-api/tarball ' , array ( ' ref ' => null ) )
236
+ ->with ('repos/KnpLabs/php-github-api/tarball ' )
237
237
->will ($ this ->returnValue ($ expectedValue ));
238
238
239
239
$ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'someFormat ' ));
@@ -249,7 +249,7 @@ public function shouldFetchTarballArchive()
249
249
$ api = $ this ->getApiMock ();
250
250
$ api ->expects ($ this ->once ())
251
251
->method ('get ' )
252
- ->with ('repos/KnpLabs/php-github-api/tarball ' , array ( ' ref ' => null ) )
252
+ ->with ('repos/KnpLabs/php-github-api/tarball ' )
253
253
->will ($ this ->returnValue ($ expectedValue ));
254
254
255
255
$ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'tarball ' ));
@@ -265,12 +265,28 @@ public function shouldFetchZipballArchive()
265
265
$ api = $ this ->getApiMock ();
266
266
$ api ->expects ($ this ->once ())
267
267
->method ('get ' )
268
- ->with ('repos/KnpLabs/php-github-api/zipball ' , array ( ' ref ' => null ) )
268
+ ->with ('repos/KnpLabs/php-github-api/zipball ' )
269
269
->will ($ this ->returnValue ($ expectedValue ));
270
270
271
271
$ this ->assertEquals ($ expectedValue , $ api ->archive ('KnpLabs ' , 'php-github-api ' , 'zipball ' ));
272
272
}
273
273
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
+
274
290
/**
275
291
* @test
276
292
*/
0 commit comments