summaryrefslogtreecommitdiffstats
path: root/tests/Bootstrap.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-05-09 11:19:15 +0200
committerAndrey Andreev <narf@devilix.net>2014-05-09 11:19:15 +0200
commit263e8fe0978e606137176135f0737c1dee319f0e (patch)
tree1cc505700a0df073a4591eb523ff954e73b9c35a /tests/Bootstrap.php
parenta5621b8965ebcec213d3a5b07500cfcc3a730ada (diff)
Fix PHP 5.6 charset-related warnings in tests
Diffstat (limited to 'tests/Bootstrap.php')
-rw-r--r--tests/Bootstrap.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php
index 9a06f9eb4..195fc0dca 100644
--- a/tests/Bootstrap.php
+++ b/tests/Bootstrap.php
@@ -41,11 +41,12 @@ isset($_SERVER['REMOTE_ADDR']) OR $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
include_once $dir.'/mocks/core/common.php';
include_once SYSTEM_PATH.'core/Common.php';
+ini_set('default_charset', 'UTF-8');
if (extension_loaded('mbstring'))
{
defined('MB_ENABLED') OR define('MB_ENABLED', TRUE);
- mb_internal_encoding('UTF-8');
+ ini_set('mbstring.internal_encoding', 'UTF-8');
mb_substitute_character('none');
}
else
@@ -56,13 +57,15 @@ else
if (extension_loaded('iconv'))
{
defined('ICONV_ENABLED') OR define('ICONV_ENABLED', TRUE);
- iconv_set_encoding('internal_encoding', 'UTF-8');
+ @ini_set('iconv.internal_encoding', 'UTF-8');
}
else
{
defined('ICONV_ENABLED') OR define('ICONV_ENABLED', FALSE);
}
+is_php('5.6') && ini_set('php.internal_encoding', 'UTF-8');
+
include_once SYSTEM_PATH.'core/compat/mbstring.php';
include_once SYSTEM_PATH.'core/compat/hash.php';
include_once SYSTEM_PATH.'core/compat/password.php';