From b20695ed9ffc056844d52f89b2bad54d68a66774 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 2 Oct 2015 08:54:52 +0000 Subject: [PATCH] Skip two `wp_json_encode()` tests when mbstring is unavailable. git-svn-id: https://develop.svn.wordpress.org/trunk@34771 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/functions.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index 0966fa1ca1..f077c32d9d 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -603,6 +603,10 @@ class Tests_Functions extends WP_UnitTestCase { * @ticket 28786 */ function test_wp_json_encode_non_utf8() { + if ( ! function_exists( 'mb_detect_order' ) ) { + $this->markTestSkipped( 'mbstring extension not available.' ); + } + $old_charsets = $charsets = mb_detect_order(); if ( ! in_array( 'EUC-JP', $charsets ) ) { $charsets[] = 'EUC-JP'; @@ -623,6 +627,10 @@ class Tests_Functions extends WP_UnitTestCase { * @ticket 28786 */ function test_wp_json_encode_non_utf8_in_array() { + if ( ! function_exists( 'mb_detect_order' ) ) { + $this->markTestSkipped( 'mbstring extension not available.' ); + } + $old_charsets = $charsets = mb_detect_order(); if ( ! in_array( 'EUC-JP', $charsets ) ) { $charsets[] = 'EUC-JP';