summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
authorBrennan Thompson <brenjt@gmail.com>2014-02-14 20:03:57 +0100
committerBrennan Thompson <brenjt@gmail.com>2014-02-14 20:03:57 +0100
commit6949f95f6e21980f36095490bf38fc8a172dbc0f (patch)
treeb3141f390acd0051396cda6a3da51c1f98384cca /tests/Bootstrap.php
parent68a02a01a086bbb1b8128ea2744439de84873d11 (diff)
parent81f036753272391360ba5b64e6dd93c4101a8733 (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts: system/helpers/form_helper.php
Diffstat (limited to 'tests/Bootstrap.php')
-rw-r--r--tests/Bootstrap.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index c98d88531..439c7fdab 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -40,6 +40,32 @@ isset($_SERVER['REMOTE_ADDR']) OR $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
// Prep our test environment
include_once $dir.'/mocks/core/common.php';
include_once SYSTEM_PATH.'core/Common.php';
+
+
+if (extension_loaded('mbstring'))
+{
+ defined('MB_ENABLED') OR define('MB_ENABLED', TRUE);
+ mb_internal_encoding('UTF-8');
+ mb_substitute_character('none');
+}
+else
+{
+ defined('MB_ENABLED') OR define('MB_ENABLED', FALSE);
+}
+
+if (extension_loaded('iconv'))
+{
+ defined('ICONV_ENABLED') OR define('ICONV_ENABLED', TRUE);
+ iconv_set_encoding('internal_encoding', 'UTF-8');
+}
+else
+{
+ defined('ICONV_ENABLED') OR define('ICONV_ENABLED', FALSE);
+}
+
+include_once SYSTEM_PATH.'core/compat/mbstring.php';
+include_once SYSTEM_PATH.'core/compat/password.php';
+
include_once $dir.'/mocks/autoloader.php';
spl_autoload_register('autoload');