summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-16 17:39:52 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-16 17:39:52 +0100
commit291676be2ca85581b48dfdc40889085f1928fabf (patch)
treeb488d1e888e146bc81344ad5c8cf472403dc6b48 /tests/codeigniter
parent279459e42b3a7244ab5f6db8950ed47bf80590ad (diff)
Add a unit test for CI_Utf8::_is_ascii()
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Utf8_test.php13
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