Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed tests

  • Loading branch information...
commit 00361e00875e12e4ab38a4b5d37c44c1c3034e7c 1 parent d1a452b
Bart authored
2  src/Composer/Repository/Vcs/GitHubDriver.php
@@ -270,7 +270,7 @@ protected function fetchRootIdentifier()
270 270 // cannot ask for authentication credentials (because we
271 271 // are not interactive) then we fallback to GitDriver.
272 272 $this->gitDriver = new GitDriver(
273   - $this->generateSshUrl(),
  273 + array('url' => $this->generateSshUrl()),
274 274 $this->io,
275 275 $this->config,
276 276 $this->process,
24 tests/Composer/Test/Repository/Vcs/GitHubDriverTest.php
@@ -77,7 +77,11 @@ public function testPrivateRepository()
77 77 ->with($this->equalTo('github.com'), $this->equalTo($repoApiUrl), $this->equalTo(false))
78 78 ->will($this->returnValue('{"master_branch": "test_master"}'));
79 79
80   - $gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, $process, $remoteFilesystem);
  80 + $repoConfig = array(
  81 + 'url' => $repoUrl,
  82 + );
  83 +
  84 + $gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, $process, $remoteFilesystem);
81 85 $gitHubDriver->initialize();
82 86 $this->setAttribute($gitHubDriver, 'tags', array($identifier => $sha));
83 87
@@ -125,7 +129,11 @@ public function testPublicRepository()
125 129 ->with($this->equalTo('github.com'), $this->equalTo($repoApiUrl), $this->equalTo(false))
126 130 ->will($this->returnValue('{"master_branch": "test_master"}'));
127 131
128   - $gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, null, $remoteFilesystem);
  132 + $repoConfig = array(
  133 + 'url' => $repoUrl,
  134 + );
  135 +
  136 + $gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, null, $remoteFilesystem);
129 137 $gitHubDriver->initialize();
130 138 $this->setAttribute($gitHubDriver, 'tags', array($identifier => $sha));
131 139
@@ -183,7 +191,11 @@ public function testPublicRepository2()
183 191 ->with($this->equalTo('github.com'), $this->equalTo('https://api.github.com/repos/composer/packagist/commits/feature%2F3.2-foo'), $this->equalTo(false))
184 192 ->will($this->returnValue('{"commit": {"committer":{ "date": "2012-09-10"}}}'));
185 193
186   - $gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, null, $remoteFilesystem);
  194 + $repoConfig = array(
  195 + 'url' => $repoUrl,
  196 + );
  197 +
  198 + $gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, null, $remoteFilesystem);
187 199 $gitHubDriver->initialize();
188 200 $this->setAttribute($gitHubDriver, 'tags', array($identifier => $sha));
189 201
@@ -271,7 +283,11 @@ public function testPrivateRepositoryNoInteraction()
271 283 ->method('splitLines')
272 284 ->will($this->returnValue(array('* test_master')));
273 285
274   - $gitHubDriver = new GitHubDriver($repoUrl, $io, $this->config, $process, $remoteFilesystem);
  286 + $repoConfig = array(
  287 + 'url' => $repoUrl,
  288 + );
  289 +
  290 + $gitHubDriver = new GitHubDriver($repoConfig, $io, $this->config, $process, $remoteFilesystem);
275 291 $gitHubDriver->initialize();
276 292
277 293 $this->assertEquals('test_master', $gitHubDriver->getRootIdentifier());
6 tests/Composer/Test/Repository/Vcs/SvnDriverTest.php
@@ -45,7 +45,11 @@ public function testWrongCredentialsInUrl()
45 45 'home' => sys_get_temp_dir() . '/composer-test',
46 46 ),
47 47 ));
48   - $svn = new SvnDriver('http://till:secret@corp.svn.local/repo', $console, $config, $process);
  48 + $repoConfig = array(
  49 + 'url' => 'http://till:secret@corp.svn.local/repo',
  50 + );
  51 +
  52 + $svn = new SvnDriver($repoConfig, $console, $config, $process);
49 53 $svn->initialize();
50 54 }
51 55

0 comments on commit 00361e0

Please sign in to comment.
Something went wrong with that request. Please try again.