summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/core/Utf8_test.php
blob: 71299134e7c3eee08842b555ff432f3019b694d1 (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_test('foo bar'));
		$this->assertFalse($this->utf8->is_ascii_test('тест'));
	}

}