コード例 #1
0
 public function let(OrganizationInfo $organization, RepositoryCollection $repositoryCollection)
 {
     $organization->getOrganizationName()->willReturn('owner-name');
     $repositoryCollection->count()->willReturn(1);
     $this->beConstructedWith($organization, $repositoryCollection);
 }
コード例 #2
0
ファイル: GitHubController.php プロジェクト: brankol/devboard
 /**
  * @param OrganizationInfo $organization
  *
  * @return RepositoryCollection
  */
 private function fetchOrganizationRepos(OrganizationInfo $organization)
 {
     $orgRepos = $this->getClient()->organization()->repositories($organization->getOrganizationName());
     $results = new RepositoryCollection();
     foreach ($orgRepos as $repoData) {
         $repoInfo = new RepoInfo($repoData['owner']['login'], $repoData['name']);
         $results->add($repoInfo);
     }
     return $results;
 }