blob: b77d717e7a25905029bc7f8daddd9e4514260877 [file] [log] [blame]
Taufan Aditya7756af52012-05-15 23:57:05 +07001<?php
2
3class Mock_Core_Utf8 extends CI_Utf8 {
4
5 /**
6 * We need to define several constants as
7 * the same process within CI_Utf8 class constructor.
8 *
9 * @covers CI_Utf8::__construct()
10 */
11 public function __construct()
12 {
13 defined('UTF8_ENABLED') or define('UTF8_ENABLED', TRUE);
14
15 if (extension_loaded('mbstring'))
16 {
17 defined('MB_ENABLED') or define('MB_ENABLED', TRUE);
18 mb_internal_encoding('UTF-8');
19 }
20 else
21 {
22 defined('MB_ENABLED') or define('MB_ENABLED', FALSE);
23 }
24
25 }
26
27}