1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Use the api to get file contents instead of raw.github.com

raw.github does not like the access_token query param
This commit is contained in:
Jordi Boggiano 2013-02-27 14:02:57 +01:00
parent 5454645cf3
commit 259a25344d
2 changed files with 7 additions and 4 deletions

View file

@ -198,8 +198,8 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
$remoteFilesystem->expects($this->at(1))
->method('getContents')
->with($this->equalTo('github.com'), $this->equalTo('https://raw.github.com/composer/packagist/feature/3.2-foo/composer.json'), $this->equalTo(false))
->will($this->returnValue('{"support": {"source": "'.$repoUrl.'" }}'));
->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com/repos/composer/packagist/contents/composer.json?ref=feature%2F3.2-foo'), $this->equalTo(false))
->will($this->returnValue('{"encoding":"base64","content":"'.base64_encode('{"support": {"source": "'.$repoUrl.'" }}').'"}'));
$remoteFilesystem->expects($this->at(2))
->method('getContents')