1
0
Fork 0

Correct the tests for dist urls for github

pull/2753/head
Nils Adermann 2014-02-24 19:51:03 +01:00
parent 35fbe3fd42
commit 1ccf4b0fc3
1 changed files with 4 additions and 7 deletions

View File

@ -283,19 +283,16 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('test_master', $gitHubDriver->getRootIdentifier()); $this->assertEquals('test_master', $gitHubDriver->getRootIdentifier());
// Dist is not available for GitDriver $dist = $gitHubDriver->getDist($sha);
$dist = $gitHubDriver->getDist($identifier); $this->assertEquals('zip', $dist['type']);
$this->assertNull($dist); $this->assertEquals('https://api.github.com/repos/composer/packagist/zipball/SOMESHA', $dist['url']);
$this->assertEquals($sha, $dist['reference']);
$source = $gitHubDriver->getSource($identifier); $source = $gitHubDriver->getSource($identifier);
$this->assertEquals('git', $source['type']); $this->assertEquals('git', $source['type']);
$this->assertEquals($repoSshUrl, $source['url']); $this->assertEquals($repoSshUrl, $source['url']);
$this->assertEquals($identifier, $source['reference']); $this->assertEquals($identifier, $source['reference']);
// Dist is not available for GitDriver
$dist = $gitHubDriver->getDist($sha);
$this->assertNull($dist);
$source = $gitHubDriver->getSource($sha); $source = $gitHubDriver->getSource($sha);
$this->assertEquals('git', $source['type']); $this->assertEquals('git', $source['type']);
$this->assertEquals($repoSshUrl, $source['url']); $this->assertEquals($repoSshUrl, $source['url']);