1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 16:42:57 +00:00

Fix unit tests for VcsRepository

This commit is contained in:
Jerome Tamarelle 2012-04-25 17:35:47 +02:00
parent 1139b5c306
commit 610f15a768
5 changed files with 22 additions and 8 deletions

View file

@ -235,6 +235,7 @@ class GitHubDriver extends VcsDriver
$this->gitDriver = new GitDriver(
$this->generateSshUrl(),
$this->io,
$this->config,
$this->process,
$this->remoteFilesystem
);

View file

@ -33,7 +33,7 @@ class SvnDriver extends VcsDriver
/**
* @var \Composer\Util\Svn
*/
protected $util;
private $util;
/**
* Execute an SVN command and try to fix up the process with credentials
@ -46,6 +46,10 @@ class SvnDriver extends VcsDriver
*/
protected function execute($command, $url)
{
if (null === $this->util) {
$this->util = new SvnUtil($this->baseUrl, $this->io, $this->process);
}
try {
return $this->util->execute($command, $url);
} catch (\RuntimeException $e) {
@ -65,7 +69,6 @@ class SvnDriver extends VcsDriver
if (false !== ($pos = strrpos($this->url, '/trunk'))) {
$this->baseUrl = substr($this->url, 0, $pos);
}
$this->util = new SvnUtil($this->baseUrl, $this->io, $this->process);
$this->getBranches();
$this->getTags();