示例#1
0
 private function getAccessURLs()
 {
     $urls = $this->repository->getAccessURL();
     if ($this->repository->isMigratedToGerrit()) {
         $gerrit_user = $this->gerrit_usermanager->getGerritUser($this->current_user);
         $gerrit_server = $this->gerrit_servers[$this->repository->getRemoteServerId()];
         $driver = $this->driver_factory->getDriver($gerrit_server);
         $gerrit_project = $driver->getGerritProjectName($this->repository);
         $clone_url = $gerrit_server->getEndUserCloneUrl($gerrit_project, $gerrit_user);
         $this->prependGerritCloneURL($urls, $clone_url);
     }
     return $urls;
 }
示例#2
0
 public function itReturnsTheBackendContent()
 {
     $access_url = array('ssh' => 'plop');
     stub($this->backend)->getAccessURL()->returns(array('ssh' => 'plop'));
     $this->assertEqual($this->repository->getAccessURL(), $access_url);
 }