summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
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');