@@ -164,7 +164,8 @@ discard block |
||
164 | 164 | $this->assertNull($url->getProject()); |
165 | 165 | } |
166 | 166 | |
167 | - /** @return Git_URL */ |
|
167 | + /** @param string $uri |
|
168 | +/** @return Git_URL */ |
|
168 | 169 | private function getGitURL($uri = null) { |
169 | 170 | return new Git_URL( |
170 | 171 | $this->project_manager, |
@@ -337,7 +338,8 @@ discard block |
||
337 | 338 | $this->assertEqual($url->getQueryString(), 'service=git-upload-pack'); |
338 | 339 | } |
339 | 340 | |
340 | - /** @return Git_URL */ |
|
341 | + /** @param string $url |
|
342 | +/** @return Git_URL */ |
|
341 | 343 | private function getUrl($url) { |
342 | 344 | return new Git_URL( |
343 | 345 | $this->project_manager, |
@@ -34,6 +34,10 @@ discard block |
||
34 | 34 | |
35 | 35 | abstract class Git_Backend_GitoliteCommonTest extends TuleapTestCase { |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $name |
|
39 | + * @param string $namespace |
|
40 | + */ |
|
37 | 41 | protected function _GivenAGitRepoWithNameAndNamespace($name, $namespace) { |
38 | 42 | $repository = new GitRepository(); |
39 | 43 | $repository->setName($name); |
@@ -92,6 +96,10 @@ discard block |
||
92 | 96 | unlink(dirname(__FILE__).'/_fixtures/tmp/perms'); |
93 | 97 | } |
94 | 98 | |
99 | + /** |
|
100 | + * @param string $className |
|
101 | + * @param string[] $methods |
|
102 | + */ |
|
95 | 103 | function getPartialMock($className, $methods) { |
96 | 104 | $partialName = $className.'Partial'.uniqid(); |
97 | 105 | Mock::generatePartial($className, $partialName, $methods); |
@@ -130,6 +130,9 @@ discard block |
||
130 | 130 | return file_get_contents($this->_glAdmDir.'/conf/gitolite.conf'); |
131 | 131 | } |
132 | 132 | |
133 | + /** |
|
134 | + * @param string $filename |
|
135 | + */ |
|
133 | 136 | protected function getFileConf($filename) { |
134 | 137 | return file_get_contents($this->_glAdmDir.'/conf/'.$filename.'.conf'); |
135 | 138 | } |
@@ -213,6 +216,11 @@ discard block |
||
213 | 216 | return $groupInfo['name']; |
214 | 217 | } |
215 | 218 | |
219 | + /** |
|
220 | + * @param string $repoPath |
|
221 | + * @param string $namespace |
|
222 | + * @param string $group |
|
223 | + */ |
|
216 | 224 | protected function assertNameSpaceFileHasBeenInitialized($repoPath, $namespace, $group) { |
217 | 225 | $namespaceInfoFile = $repoPath.'/tuleap_namespace'; |
218 | 226 | $this->assertTrue(file_exists($namespaceInfoFile), 'the file (' . $namespaceInfoFile . ') does not exists'); |
@@ -221,6 +229,10 @@ discard block |
||
221 | 229 | |
222 | 230 | } |
223 | 231 | |
232 | + /** |
|
233 | + * @param string $new_root_dir |
|
234 | + * @param string $group |
|
235 | + */ |
|
224 | 236 | protected function assertWritableByGroup($new_root_dir, $group) { |
225 | 237 | $this->assertEqual($group, $this->_getFileGroupName($new_root_dir)); |
226 | 238 | $this->assertEqual($group, $this->_getFileGroupName($new_root_dir .'/hooks/gitolite_hook.sh')); |
@@ -230,6 +242,9 @@ discard block |
||
230 | 242 | $this->assertPattern('/.*770$/', decoct($rootStats[2])); |
231 | 243 | } |
232 | 244 | |
245 | + /** |
|
246 | + * @param string $new_root_dir |
|
247 | + */ |
|
233 | 248 | public function assertRepoIsClonedWithHooks($new_root_dir) { |
234 | 249 | $this->assertTrue(is_dir($new_root_dir), "the new git repo dir ($new_root_dir) wasn't found."); |
235 | 250 | $new_repo_HEAD = $new_root_dir . '/HEAD'; |
@@ -617,6 +617,10 @@ |
||
617 | 617 | $this->changeProjectRepositoriesAccess($project_id, $is_private); |
618 | 618 | } |
619 | 619 | |
620 | + /** |
|
621 | + * @param integer $project_id |
|
622 | + * @param boolean $is_private |
|
623 | + */ |
|
620 | 624 | private function changeProjectRepositoriesAccess($project_id, $is_private) { |
621 | 625 | return GitActions::changeProjectRepositoriesAccess($project_id, $is_private, $this->dao, $this->factory); |
622 | 626 | } |
@@ -94,6 +94,9 @@ discard block |
||
94 | 94 | $this->manager = new GitRepositoryManager($this->factory, mock('Git_SystemEventManager'), $this->dao, $this->backup_directory); |
95 | 95 | } |
96 | 96 | |
97 | + /** |
|
98 | + * @param string $path |
|
99 | + */ |
|
97 | 100 | private function aRepoWithPath($path) { |
98 | 101 | return aGitRepository()->withPath($this->project_name.'/'.$path.'.git')->withProject($this->project)->build(); |
99 | 102 | } |
@@ -229,6 +232,9 @@ discard block |
||
229 | 232 | class GitRepositoryIdMatchExpectation extends SimpleExpectation { |
230 | 233 | private $repository_id; |
231 | 234 | |
235 | + /** |
|
236 | + * @param integer $repository_id |
|
237 | + */ |
|
232 | 238 | public function __construct($repository_id) { |
233 | 239 | parent::__construct(); |
234 | 240 | $this->repository_id = $repository_id; |
@@ -397,6 +403,9 @@ discard block |
||
397 | 403 | $this->manager->forkRepositories($repos, $to_project, $this->user, '', null, $this->forkPermissions); |
398 | 404 | } |
399 | 405 | |
406 | + /** |
|
407 | + * @param string[] $repo_ids |
|
408 | + */ |
|
400 | 409 | protected function getRepoCollectionUnreadableFor($repo_ids, $user) { |
401 | 410 | $return = array(); |
402 | 411 | foreach ($repo_ids as $id) { |
@@ -487,6 +496,9 @@ discard block |
||
487 | 496 | $this->forkRepositories(array($this->repository), '^toto/pouet'); |
488 | 497 | } |
489 | 498 | |
499 | + /** |
|
500 | + * @param integer $id |
|
501 | + */ |
|
490 | 502 | private function GivenARepository($id) { |
491 | 503 | $repo = new MockGitRepository(); |
492 | 504 | $repo->setReturnValue('getId', $id); |
@@ -496,6 +508,9 @@ discard block |
||
496 | 508 | return $repo; |
497 | 509 | } |
498 | 510 | |
511 | + /** |
|
512 | + * @param string $namespace |
|
513 | + */ |
|
499 | 514 | private function forkRepositories($repositories, $namespace=null) { |
500 | 515 | $this->manager->forkRepositories($repositories, $this->project, $this->user, $namespace, null, $this->forkPermissions); |
501 | 516 | } |
@@ -140,6 +140,10 @@ |
||
140 | 140 | $this->assertEqual('u/johan/tulip', $repo->getFullName()); |
141 | 141 | } |
142 | 142 | |
143 | + /** |
|
144 | + * @param string $name |
|
145 | + * @param null|string $namespace |
|
146 | + */ |
|
143 | 147 | protected function _GivenARepositoryWithNameAndNamespace($name, $namespace) { |
144 | 148 | $repo = new GitRepository(); |
145 | 149 | $repo->setName($name); |
@@ -229,6 +229,9 @@ discard block |
||
229 | 229 | $this->assertItNeedsAValidRepoId(); |
230 | 230 | } |
231 | 231 | |
232 | + /** |
|
233 | + * @param Codendi_Request $request |
|
234 | + */ |
|
232 | 235 | protected function getGit($request, $factory) { |
233 | 236 | $git = parent::getGit($request, $factory); |
234 | 237 | $git->setAction('disconnect_gerrit'); |
@@ -332,6 +335,9 @@ discard block |
||
332 | 335 | $git->request(); |
333 | 336 | } |
334 | 337 | |
338 | + /** |
|
339 | + * @param Codendi_Request $request |
|
340 | + */ |
|
335 | 341 | protected function getGit($request, $factory, $template_factory = null) { |
336 | 342 | $git = parent::getGit($request, $factory, $template_factory); |
337 | 343 | $git->setAction('migrate_to_gerrit'); |
@@ -26,6 +26,9 @@ |
||
26 | 26 | |
27 | 27 | abstract class GitViewsRepositoriesTraversalStrategyTest extends TuleapTestCase { |
28 | 28 | |
29 | + /** |
|
30 | + * @param string $classname |
|
31 | + */ |
|
29 | 32 | public function __construct($classname) { |
30 | 33 | parent::__construct(); |
31 | 34 | $this->classname = $classname; |
@@ -86,6 +86,9 @@ discard block |
||
86 | 86 | |
87 | 87 | } |
88 | 88 | |
89 | + /** |
|
90 | + * @param string $unixName |
|
91 | + */ |
|
89 | 92 | private function GivenAProject($id, $name, $unixName = null, $useGit = true) { |
90 | 93 | $project = new MockProject(); |
91 | 94 | $project->setReturnValue('getId', $id); |
@@ -95,6 +98,10 @@ discard block |
||
95 | 98 | return $project; |
96 | 99 | } |
97 | 100 | |
101 | + /** |
|
102 | + * @param string $id |
|
103 | + * @param string $name |
|
104 | + */ |
|
98 | 105 | private function GivenAProjectWithoutGitService($id, $name) { |
99 | 106 | return $this->GivenAProject($id, $name, null, false); |
100 | 107 | } |