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

github deprecation changes

- added some tests
- minor bug fixes discovered during testing
- resolved two deprecations (rate limit api and authorizations api)
- added some more comments to make the flow more understandable
This commit is contained in:
Rob Bast 2015-02-05 14:46:14 +01:00
parent 07c644ac22
commit a34335a9bb
4 changed files with 366 additions and 103 deletions

View file

@ -79,16 +79,11 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
->with($this->equalTo('github.com'), $this->matchesRegularExpression('{someuser|abcdef}'), $this->matchesRegularExpression('{somepassword|x-oauth-basic}'));
$remoteFilesystem->expects($this->at(1))
->method('getContents')
->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com/authorizations'), $this->equalTo(false))
->will($this->returnValue('[]'));
$remoteFilesystem->expects($this->at(2))
->method('getContents')
->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com/authorizations'), $this->equalTo(false))
->will($this->returnValue('{"token": "abcdef"}'));
$remoteFilesystem->expects($this->at(3))
$remoteFilesystem->expects($this->at(2))
->method('getContents')
->with($this->equalTo('github.com'), $this->equalTo($repoApiUrl), $this->equalTo(false))
->will($this->returnValue('{"master_branch": "test_master", "private": true, "owner": {"login": "composer"}, "name": "packagist"}'));