summaryrefslogtreecommitdiff
path: root/tests/units/Helper
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-24 13:29:24 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-24 13:29:24 -0400
commitbe22f0619e25b15c8c3d002cf1f190aa9976bc71 (patch)
treed2007a08747154830bf2df202f4321fe7d0e8ec9 /tests/units/Helper
parenta6d22bf2715347d4f340376efee75dc57176c8b6 (diff)
Remove method UserModel::getFullname()
Diffstat (limited to 'tests/units/Helper')
-rw-r--r--tests/units/Helper/UserHelperTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/units/Helper/UserHelperTest.php b/tests/units/Helper/UserHelperTest.php
index d5bd1789..4d1947d8 100644
--- a/tests/units/Helper/UserHelperTest.php
+++ b/tests/units/Helper/UserHelperTest.php
@@ -13,6 +13,21 @@ use Kanboard\Model\UserModel;
class UserHelperTest extends Base
{
+ public function testGetFullname()
+ {
+ $userModel = new UserModel($this->container);
+ $userHelper = new UserHelper($this->container);
+
+ $this->assertEquals(2, $userModel->create(array('username' => 'user1')));
+ $this->assertEquals(3, $userModel->create(array('username' => 'user2', 'name' => 'User #2')));
+
+ $user1 = $userModel->getById(2);
+ $user2 = $userModel->getById(3);
+
+ $this->assertEquals('user1', $userHelper->getFullname($user1));
+ $this->assertEquals('User #2', $userHelper->getFullname($user2));
+ }
+
public function testInitials()
{
$helper = new UserHelper($this->container);