Пример #1
0
 /**
  * set up
  */
 public function testCloneUrl()
 {
     $cc = CloneCommand::getInstance();
     $this->assertEquals("clone 'git://github.com/matteosister/GitElephant.git'", $cc->cloneUrl('git://github.com/matteosister/GitElephant.git'));
     $this->assertEquals("clone 'git://github.com/matteosister/GitElephant.git' 'test'", $cc->cloneUrl('git://github.com/matteosister/GitElephant.git', 'test'));
 }
Пример #2
0
 /**
  * Clone a repository
  *
  * @param string $url the repository url (i.e. git://github.com/matteosister/GitElephant.git)
  * @param null   $to  where to clone the repo
  *
  * @throws \RuntimeException
  * @throws \Symfony\Component\Process\Exception\LogicException
  * @throws \Symfony\Component\Process\Exception\InvalidArgumentException
  * @throws \Symfony\Component\Process\Exception\RuntimeException
  * @return Repository
  */
 public function cloneFrom($url, $to = null)
 {
     $this->caller->execute(CloneCommand::getInstance($this)->cloneUrl($url, $to));
     return $this;
 }