summaryrefslogtreecommitdiffstats
path: root/tests/mocks
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-20 16:51:41 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-20 16:51:41 +0100
commitbb3edf12d0ca82c62f7b7d570108375ec4379749 (patch)
tree8be304b5b58b42698bfaf37e6dd19a451a19fa96 /tests/mocks
parent10e7a32257b26c5609f4a745e3f80bde00da3a05 (diff)
CI_Utf8-related changes
- Give priority to mb_convert_encoding() over iconv() in clean_string() (partially fixes #261) - Add more proper unit tests
Diffstat (limited to 'tests/mocks')
-rw-r--r--tests/mocks/core/utf8.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mocks/core/utf8.php b/tests/mocks/core/utf8.php
index c8214a62a..3a6282e1d 100644
--- a/tests/mocks/core/utf8.php
+++ b/tests/mocks/core/utf8.php
@@ -5,12 +5,15 @@ class Mock_Core_Utf8 extends CI_Utf8 {
/**
* We need to define UTF8_ENABLED the same way that
* CI_Utf8 constructor does.
- *
- * @covers CI_Utf8::__construct()
*/
public function __construct()
{
- defined('UTF8_ENABLED') OR define('UTF8_ENABLED', TRUE);
+ if (defined('UTF8_ENABLED'))
+ {
+ return;
+ }
+
+ parent::__construct();
}
} \ No newline at end of file