mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Add unit tests for utf8_clean()
This commit is contained in:
parent
d9a63c30ce
commit
a740f39538
1 changed files with 5 additions and 0 deletions
|
|
@ -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('한글은 인코딩하지 않음'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue