Add more unit tests

This commit is contained in:
Frederic Guillot
2015-12-06 00:00:09 -05:00
parent db5da71f15
commit 9bd7985ba4
10 changed files with 318 additions and 9 deletions

View File

@@ -116,10 +116,10 @@ class GithubAuth extends Base implements OAuthAuthenticationProviderInterface
/**
* Get Github profile
*
* @access private
* @access public
* @return array
*/
private function getProfile()
public function getProfile()
{
$this->getService()->getAccessToken($this->code);

View File

@@ -116,10 +116,10 @@ class GitlabAuth extends Base implements OAuthAuthenticationProviderInterface
/**
* Get Gitlab profile
*
* @access private
* @access public
* @return array
*/
private function getProfile()
public function getProfile()
{
$this->getService()->getAccessToken($this->code);

View File

@@ -116,10 +116,10 @@ class GoogleAuth extends Base implements OAuthAuthenticationProviderInterface
/**
* Get Google profile
*
* @access private
* @access public
* @return array
*/
private function getProfile()
public function getProfile()
{
$this->getService()->getAccessToken($this->code);

View File

@@ -66,6 +66,6 @@ class GroupManager
}
}
return $result;
return array_values($result);
}
}

View File

@@ -39,7 +39,7 @@ class DatabaseGroupProvider implements GroupProviderInterface
*/
public function getInternalId()
{
return $this->group['id'];
return (int) $this->group['id'];
}
/**

View File

@@ -75,7 +75,7 @@ class Group extends Base
*/
public function search($input)
{
return $this->db->table(self::TABLE)->ilike('name', '%'.$input.'%')->findAll();
return $this->db->table(self::TABLE)->ilike('name', '%'.$input.'%')->asc('name')->findAll();
}
/**