Skip to content
Permalink
Browse files

Write a function testIsMultibyteString() for testing isMultibyte() me…

…thod of Utility/Text Class
  • Loading branch information...
sohelrana820 committed Mar 16, 2018
1 parent 79ef344 commit 6d122ae580753cfe21b5646eacc0e7462bd3c886
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/TestCase/Utility/TextTest.php
@@ -537,6 +537,17 @@ public function testWrapBlockIndentWithMultibyte()
$this->assertTextEquals($expected, $result);
}
public function testIsMultibyteString()
{
$text = 'This is a test string without multi-bytes';
$result = Text::isMultibyte($text);
$this->assertFalse($result);
$text = 'This is a test string with multi-bytes 这是永远不会结束的歌曲';
$result = Text::isMultibyte($text);
$this->assertTrue($result);
}
/**
* testTruncate method
*

0 comments on commit 6d122ae

Please sign in to comment.
You can’t perform that action at this time.