/**
  * Execute the console command.
  * @return void
  */
 public function fire()
 {
     $accountName = $this->input->getArgument('account');
     try {
         $data = $this->github->getGithubUser($accountName);
         if (isset($data['id'])) {
             $this->acl->setAccessControl($accountName);
             $this->info("added : {$accountName}");
         }
     } catch (\GuzzleHttp\Exception\ClientException $e) {
         $this->error("{$accountName} Not Found");
     } catch (\Illuminate\Database\QueryException $e) {
         $this->info("{$accountName} has already been added");
     }
 }
Пример #2
0
 public function testTrueGithubUser()
 {
     $this->assertInternalType('array', $this->auth->getGithubUser('ytake'));
 }