diff options
author | Andrey Andreev <narf@devilix.net> | 2014-01-16 17:39:52 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-01-16 17:39:52 +0100 |
commit | 291676be2ca85581b48dfdc40889085f1928fabf (patch) | |
tree | b488d1e888e146bc81344ad5c8cf472403dc6b48 /tests/codeigniter | |
parent | 279459e42b3a7244ab5f6db8950ed47bf80590ad (diff) |
Add a unit test for CI_Utf8::_is_ascii()
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Utf8_test.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/codeigniter/core/Utf8_test.php b/tests/codeigniter/core/Utf8_test.php index caa7b6986..71299134e 100644 --- a/tests/codeigniter/core/Utf8_test.php +++ b/tests/codeigniter/core/Utf8_test.php @@ -11,10 +11,15 @@ class Utf8_test extends CI_TestCase { public function test_convert_to_utf8() { - $this->assertEquals( - $this->utf8->convert_to_utf8('๒ๅ๑๒', 'WINDOWS-1251'), - 'ัะตัั' - ); + $this->assertEquals('ัะตัั', $this->utf8->convert_to_utf8('๒ๅ๑๒', 'WINDOWS-1251')); + } + + // -------------------------------------------------------------------- + + public function test_is_ascii() + { + $this->assertTrue($this->utf8->is_ascii_test('foo bar')); + $this->assertFalse($this->utf8->is_ascii_test('ัะตัั')); } }
\ No newline at end of file |