blob: 2cf404841189205611ea36e33b5b4a33e6b994c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<?php
class Utf8_test extends CI_TestCase {
public function set_up()
{
$this->utf8 = new Mock_Core_Utf8();
}
// --------------------------------------------------------------------
public function test_convert_to_utf8()
{
$this->assertEquals('тест', $this->utf8->convert_to_utf8('', 'WINDOWS-1251'));
}
// --------------------------------------------------------------------
public function test_is_ascii()
{
$this->assertTrue($this->utf8->is_ascii('foo bar'));
$this->assertFalse($this->utf8->is_ascii('тест'));
}
}
|