public function writeGitoliteConfiguration() { $git_modifications = new Git_Gitolite_GitModifications(); $hostname = $this->gitoliterc_reader->getHostname(); if ($hostname) { $this->writeGitoliteConfigurationOnDisk($this->permissions_serializer->getGitoliteDotConfForHostname($this->getProjectList()), $git_modifications); $this->writeGitoliteIncludesInHostnameFile($hostname, $git_modifications, $this->getProjectList()); return $git_modifications; } $this->writeGitoliteConfigurationOnDisk($this->permissions_serializer->getGitoliteDotConf($this->getProjectList()), $git_modifications); return $git_modifications; }
public function __only__itGrantsReadAccessToGitoliteAdminForMirrorUsers() { stub($this->mirror_mapper)->fetchAll()->returns(array($this->mirror_1, $this->mirror_2)); $serializer = new Git_Gitolite_ConfigPermissionsSerializer($this->mirror_mapper, 'whatever'); $this->assertEqual(file_get_contents(dirname(__FILE__) . '/_fixtures/mirrors_gitolite.conf'), $serializer->getGitoliteDotConf(array('projecta', 'projectb'))); }