Esempio n. 1
0
 /**
  * Get a GitHub $user's repositories
  *
  * @param string $user
  *
  * @return array
  *
  * @throws \BadMethodCallException
  */
 public function getRepositories($user)
 {
     $response = $this->requester->make('GET', $this->base_url . "/users/{$user}/repos", ['headers' => ['Accept' => $this->accept]]);
     return Repositories::format($response);
 }
 public function testMultiArrayRepositoryCall()
 {
     $expected = [['id' => 1, 'name' => 'repository_name', 'full_name' => 'username/repository_name', 'private' => false, 'description' => null, 'fork' => false, 'default_branch' => 'master'], ['id' => 2, 'name' => 'repository_name', 'full_name' => 'username/repository_name', 'private' => false, 'description' => null, 'fork' => false, 'default_branch' => 'master']];
     $this->assertEquals($expected, Repositories::format($expected));
 }