summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-12-06 00:00:09 -0500
committerFrederic Guillot <fred@kanboard.net>2015-12-06 00:00:09 -0500
commit9bd7985ba41b385c63213970b862ffc06f1096b0 (patch)
treea181044fca56fd501488c2361971dd883d6d8a89 /app
parentdb5da71f154d34d012d7259d4d627ac7cf0c38fa (diff)
Add more unit tests
Diffstat (limited to 'app')
-rw-r--r--app/Auth/GithubAuth.php4
-rw-r--r--app/Auth/GitlabAuth.php4
-rw-r--r--app/Auth/GoogleAuth.php4
-rw-r--r--app/Core/Group/GroupManager.php2
-rw-r--r--app/Group/DatabaseGroupProvider.php2
-rw-r--r--app/Model/Group.php2
6 files changed, 9 insertions, 9 deletions
diff --git a/app/Auth/GithubAuth.php b/app/Auth/GithubAuth.php
index a03c7158..606ab301 100644
--- a/app/Auth/GithubAuth.php
+++ b/app/Auth/GithubAuth.php
@@ -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);
diff --git a/app/Auth/GitlabAuth.php b/app/Auth/GitlabAuth.php
index 9e1ac4ef..084e8ab9 100644
--- a/app/Auth/GitlabAuth.php
+++ b/app/Auth/GitlabAuth.php
@@ -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);
diff --git a/app/Auth/GoogleAuth.php b/app/Auth/GoogleAuth.php
index c4acfa0f..2a1f1b46 100644
--- a/app/Auth/GoogleAuth.php
+++ b/app/Auth/GoogleAuth.php
@@ -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);
diff --git a/app/Core/Group/GroupManager.php b/app/Core/Group/GroupManager.php
index e49ffa0f..48b6c4f8 100644
--- a/app/Core/Group/GroupManager.php
+++ b/app/Core/Group/GroupManager.php
@@ -66,6 +66,6 @@ class GroupManager
}
}
- return $result;
+ return array_values($result);
}
}
diff --git a/app/Group/DatabaseGroupProvider.php b/app/Group/DatabaseGroupProvider.php
index e00f36ba..430121a3 100644
--- a/app/Group/DatabaseGroupProvider.php
+++ b/app/Group/DatabaseGroupProvider.php
@@ -39,7 +39,7 @@ class DatabaseGroupProvider implements GroupProviderInterface
*/
public function getInternalId()
{
- return $this->group['id'];
+ return (int) $this->group['id'];
}
/**
diff --git a/app/Model/Group.php b/app/Model/Group.php
index 36171ca4..a086fe9d 100644
--- a/app/Model/Group.php
+++ b/app/Model/Group.php
@@ -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();
}
/**