diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-30 21:01:41 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-30 21:01:41 -0400 |
commit | 679a22c718e8cb2d3ae6d981e1745bad948e1b92 (patch) | |
tree | e2b674aa555eae0941ff1b1a3db2a974c3f889d8 /tests/units/User | |
parent | 02cf50de80a952a4a41e29b45947ac794a8d6bb9 (diff) |
Added some unit tests for avatar letter with UTF-8
Diffstat (limited to 'tests/units/User')
-rw-r--r-- | tests/units/User/Avatar/LetterAvatarProviderTest.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/units/User/Avatar/LetterAvatarProviderTest.php b/tests/units/User/Avatar/LetterAvatarProviderTest.php index 39e51c98..0eb3ef8e 100644 --- a/tests/units/User/Avatar/LetterAvatarProviderTest.php +++ b/tests/units/User/Avatar/LetterAvatarProviderTest.php @@ -34,4 +34,12 @@ class LetterAvatarProviderTest extends Base $expected = '<div class="avatar-letter" style="background-color: rgb(134, 45, 132)" title="admin">A</div>'; $this->assertEquals($expected, $provider->render($user, 48)); } + + public function testRenderWithUTF8() + { + $provider = new LetterAvatarProvider($this->container); + $user = array('id' => 123, 'name' => 'ü', 'username' => 'admin', 'email' => ''); + $expected = '<div class="avatar-letter" style="background-color: rgb(62, 147, 31)" title="ü">Ü</div>'; + $this->assertEquals($expected, $provider->render($user, 48)); + } } |