From 679a22c718e8cb2d3ae6d981e1745bad948e1b92 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Mon, 30 May 2016 21:01:41 -0400 Subject: Added some unit tests for avatar letter with UTF-8 --- tests/units/User/Avatar/LetterAvatarProviderTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/units/User') 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 = '
A
'; $this->assertEquals($expected, $provider->render($user, 48)); } + + public function testRenderWithUTF8() + { + $provider = new LetterAvatarProvider($this->container); + $user = array('id' => 123, 'name' => 'ü', 'username' => 'admin', 'email' => ''); + $expected = '
Ü
'; + $this->assertEquals($expected, $provider->render($user, 48)); + } } -- cgit v1.2.3