Code review fixes
parent
44634a689d
commit
34ec5fba58
|
@ -22,7 +22,7 @@ class HgDriverTest extends TestCase
|
||||||
|
|
||||||
/** @type \Composer\IO\IOInterface|\PHPUnit_Framework_MockObject_MockObject */
|
/** @type \Composer\IO\IOInterface|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
private $io;
|
private $io;
|
||||||
/** @type \Composer\Config */
|
/** @type Config */
|
||||||
private $config;
|
private $config;
|
||||||
/** @type string */
|
/** @type string */
|
||||||
private $home;
|
private $home;
|
||||||
|
@ -45,18 +45,24 @@ class HgDriverTest extends TestCase
|
||||||
$fs->removeDirectory($this->home);
|
$fs->removeDirectory($this->home);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSupports()
|
/**
|
||||||
|
* @dataProvider supportsDataProvider
|
||||||
|
*/
|
||||||
|
public function testSupports($repositoryUrl)
|
||||||
{
|
{
|
||||||
$this->assertTrue(
|
$this->assertTrue(
|
||||||
HgDriver::supports($this->io, $this->config, 'ssh://bitbucket.org/user/repo')
|
HgDriver::supports($this->io, $this->config, $repositoryUrl)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->assertTrue(
|
public function supportsDataProvider()
|
||||||
HgDriver::supports($this->io, $this->config, 'ssh://hg@bitbucket.org/user/repo')
|
{
|
||||||
);
|
return array(
|
||||||
|
array('ssh://bitbucket.org/user/repo'),
|
||||||
$this->assertTrue(
|
array('ssh://hg@bitbucket.org/user/repo'),
|
||||||
HgDriver::supports($this->io, $this->config, 'ssh://user@bitbucket.org/user/repo')
|
array('ssh://user@bitbucket.org/user/repo'),
|
||||||
|
array('https://bitbucket.org/user/repo'),
|
||||||
|
array('https://user@bitbucket.org/user/repo'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue