diff options
author | dchill42 <dchill42@gmail.com> | 2012-07-23 16:53:47 +0200 |
---|---|---|
committer | dchill42 <dchill42@gmail.com> | 2012-07-23 16:53:47 +0200 |
commit | c5079de78e5141330c07e990811ef15e998e95aa (patch) | |
tree | 0f39d8c4fc7614246fc185810bfeaa7fad88a33a /tests/mocks/core/utf8.php | |
parent | 00fcb545109d4e61bc14e403ec828749c34a54b3 (diff) | |
parent | ede49ba66b127535f3430e20aac72ceed2c4611a (diff) |
Merge branch develop of github.com:/EllisLab/CodeIgniter into session
Diffstat (limited to 'tests/mocks/core/utf8.php')
-rw-r--r-- | tests/mocks/core/utf8.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/mocks/core/utf8.php b/tests/mocks/core/utf8.php new file mode 100644 index 000000000..068e74ac1 --- /dev/null +++ b/tests/mocks/core/utf8.php @@ -0,0 +1,26 @@ +<?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); + } + } + +}
\ No newline at end of file |