コード例 #1
0
ファイル: LlumRCParserTest.php プロジェクト: acacha/llum
 /**
  * test get credentials.
  */
 public function testGetCredentials()
 {
     $this->createsampleRCFile();
     $parser = new LlumRCParser(new LlumRCFile());
     $credentials = $parser->getCredentials();
     $this->assertTrue(is_array($credentials));
     $this->assertEquals('acacha', $credentials[0]);
     $this->assertEquals('abcdefgh12345678', $credentials[1]);
 }
コード例 #2
0
ファイル: GithubRepoCommand.php プロジェクト: acacha/llum
 /**
  * Get credentials.
  *
  * @param OutputInterface $input
  * @return array
  */
 public function getCredentials(OutputInterface $output)
 {
     $credentials = $this->parser->getCredentials();
     if (is_null($credentials)) {
         $this->showErrorRunLlumInitFirst($output, "Credentials");
     }
     return $credentials;
 }
コード例 #3
0
ファイル: GithubInitCommand.php プロジェクト: acacha/llum
 /**
  * Get github username from llum config.
  *
  * @param OutputInterface $output
  * @return array
  */
 protected function getGithubUserNameFromConfig(OutputInterface $output)
 {
     $username = $this->parser->getGitHubUsername();
     if (is_null($username)) {
         $this->showErrorRunLlumInitFirst($output, 'username');
     }
     return $username;
 }