12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace Composer\Test\Repository\Vcs;
- use Composer\Repository\Vcs\HgDriver;
- use Composer\Test\TestCase;
- use Composer\Util\Filesystem;
- use Composer\Config;
- class HgDriverTest extends TestCase
- {
-
- private $io;
-
- private $config;
-
- private $home;
- public function setUp()
- {
- $this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
- $this->home = $this->getUniqueTmpDirectory();
- $this->config = new Config();
- $this->config->merge(array(
- 'config' => array(
- 'home' => $this->home,
- ),
- ));
- }
- public function tearDown()
- {
- $fs = new Filesystem;
- $fs->removeDirectory($this->home);
- }
-
- public function testSupports($repositoryUrl)
- {
- $this->assertTrue(
- HgDriver::supports($this->io, $this->config, $repositoryUrl)
- );
- }
- public function supportsDataProvider()
- {
- return array(
- array('ssh://bitbucket.org/user/repo'),
- array('ssh://hg@bitbucket.org/user/repo'),
- array('ssh://user@bitbucket.org/user/repo'),
- array('https://bitbucket.org/user/repo'),
- array('https://user@bitbucket.org/user/repo'),
- );
- }
- }
|