blob: b77d717e7a25905029bc7f8daddd9e4514260877 (
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
26
27
|
<?php
class Mock_Core_Utf8 extends CI_Utf8 {
/**
* We need to define several constants as
* the same process within CI_Utf8 class constructor.
*
* @covers CI_Utf8::__construct()
*/
public function __construct()
{
defined('UTF8_ENABLED') or define('UTF8_ENABLED', TRUE);
if (extension_loaded('mbstring'))
{
defined('MB_ENABLED') or define('MB_ENABLED', TRUE);
mb_internal_encoding('UTF-8');
}
else
{
defined('MB_ENABLED') or define('MB_ENABLED', FALSE);
}
}
}
|