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
This commit is contained in:
parent
e2f61478de
commit
b20695ed9f
@ -603,6 +603,10 @@ class Tests_Functions extends WP_UnitTestCase {
|
|||||||
* @ticket 28786
|
* @ticket 28786
|
||||||
*/
|
*/
|
||||||
function test_wp_json_encode_non_utf8() {
|
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();
|
$old_charsets = $charsets = mb_detect_order();
|
||||||
if ( ! in_array( 'EUC-JP', $charsets ) ) {
|
if ( ! in_array( 'EUC-JP', $charsets ) ) {
|
||||||
$charsets[] = 'EUC-JP';
|
$charsets[] = 'EUC-JP';
|
||||||
@ -623,6 +627,10 @@ class Tests_Functions extends WP_UnitTestCase {
|
|||||||
* @ticket 28786
|
* @ticket 28786
|
||||||
*/
|
*/
|
||||||
function test_wp_json_encode_non_utf8_in_array() {
|
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();
|
$old_charsets = $charsets = mb_detect_order();
|
||||||
if ( ! in_array( 'EUC-JP', $charsets ) ) {
|
if ( ! in_array( 'EUC-JP', $charsets ) ) {
|
||||||
$charsets[] = 'EUC-JP';
|
$charsets[] = 'EUC-JP';
|
||||||
|
Loading…
Reference in New Issue
Block a user