Added some unit tests for avatar letter with UTF-8

This commit is contained in:
Frederic Guillot
2016-05-30 21:01:41 -04:00
parent 02cf50de80
commit 679a22c718
3 changed files with 12 additions and 3 deletions

View File

@@ -36,10 +36,10 @@ class UserHelper extends Base
$initials = '';
foreach (explode(' ', $name, 2) as $string) {
$initials .= mb_substr($string, 0, 1);
$initials .= mb_substr($string, 0, 1, 'UTF-8');
}
return mb_strtoupper($initials);
return mb_strtoupper($initials, 'UTF-8');
}
/**
@@ -174,7 +174,7 @@ class UserHelper extends Base
if (isset($task['creator_id']) && $task['creator_id'] == $this->userSession->getId()) {
return true;
}
if ($this->userSession->isAdmin() || $this->getProjectUserRole($task['project_id']) === Role::PROJECT_MANAGER) {
return true;
}