diff --git a/tests/unit/functions/FunctionsTest.php b/tests/unit/functions/FunctionsTest.php index f9ccc4792..7794f8ea2 100644 --- a/tests/unit/functions/FunctionsTest.php +++ b/tests/unit/functions/FunctionsTest.php @@ -196,6 +196,11 @@ class FunctionsTest extends \Codeception\TestCase\Test $this->assertFalse(utf8_check(iconv('UTF-8', 'EUC-KR', '라이믹스'))); $this->assertFalse(utf8_check(chr(129) . chr(214) . chr(181) . chr(73) . chr(97))); + $this->assertEquals('Hello', utf8_clean("\xEF\xBB\xBF" . 'Hello' . "\xBC\xBC")); + $this->assertEquals('Hello', utf8_clean('Hello‮ㅤ' . "\xE3\x85\xA4\xE2\x80\xAE")); + $this->assertEquals('Hello' . "\xC3\xA9", utf8_clean('Hello' . "e\xCC\x81")); + $this->assertEquals('Hello' . "\xCD\x9D\xCD\x9D\xCD\x9D", utf8_clean('Hello' . "\xCD\x9D\xCD\x9D\xCD\x9D\xCD\x9D\xCD\x9D")); + $this->assertEquals('Emoticon: 😁', utf8_mbencode("Emoticon: \xf0\x9f\x98\x81")); $this->assertEquals('Emoticon: 😜', utf8_mbencode("Emoticon: \xf0\x9f\x98\x9c")); $this->assertEquals('한글은 인코딩하지 않음', utf8_mbencode('한글은 인코딩하지 않음'));