1
0
Fork 0

Fixed tests

pull/1037/head
bboer 2012-08-31 08:12:20 +02:00
parent d1a452b00b
commit 00361e0087
3 changed files with 26 additions and 6 deletions

View File

@ -270,7 +270,7 @@ class GitHubDriver extends VcsDriver
// cannot ask for authentication credentials (because we
// are not interactive) then we fallback to GitDriver.
$this->gitDriver = new GitDriver(
$this->generateSshUrl(),
array('url' => $this->generateSshUrl()),
$this->io,
$this->config,
$this->process,

View File

@ -77,7 +77,11 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
->with($this->equalTo('github.com'), $this->equalTo($repoApiUrl), $this->equalTo(false))
->will($this->returnValue('{"master_branch": "test_master"}'));
$gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, $process, $remoteFilesystem);
$repoConfig = array(
'url' => $repoUrl,
);
$gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, $process, $remoteFilesystem);
$gitHubDriver->initialize();
$this->setAttribute($gitHubDriver, 'tags', array($identifier => $sha));
@ -125,7 +129,11 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
->with($this->equalTo('github.com'), $this->equalTo($repoApiUrl), $this->equalTo(false))
->will($this->returnValue('{"master_branch": "test_master"}'));
$gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, null, $remoteFilesystem);
$repoConfig = array(
'url' => $repoUrl,
);
$gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, null, $remoteFilesystem);
$gitHubDriver->initialize();
$this->setAttribute($gitHubDriver, 'tags', array($identifier => $sha));
@ -183,7 +191,11 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com/repos/composer/packagist/commits/feature%2F3.2-foo'), $this->equalTo(false))
->will($this->returnValue('{"commit": {"committer":{ "date": "2012-09-10"}}}'));
$gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, null, $remoteFilesystem);
$repoConfig = array(
'url' => $repoUrl,
);
$gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, null, $remoteFilesystem);
$gitHubDriver->initialize();
$this->setAttribute($gitHubDriver, 'tags', array($identifier => $sha));
@ -271,7 +283,11 @@ class GitHubDriverTest extends \PHPUnit_Framework_TestCase
->method('splitLines')
->will($this->returnValue(array('* test_master')));
$gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, $process, $remoteFilesystem);
$repoConfig = array(
'url' => $repoUrl,
);
$gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, $process, $remoteFilesystem);
$gitHubDriver->initialize();
$this->assertEquals('test_master', $gitHubDriver->getRootIdentifier());

View File

@ -45,7 +45,11 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
'home' => sys_get_temp_dir() . '/composer-test',
),
));
$svn = new SvnDriver('http://till:secret@corp.svn.local/repo', $console, $config, $process);
$repoConfig = array(
'url' => 'http://till:secret@corp.svn.local/repo',
);
$svn = new SvnDriver($repoConfig, $console, $config, $process);
$svn->initialize();
}