From 9ede082371fd24cb52783aa2bcfaedf9750f4120 Mon Sep 17 00:00:00 2001 From: Volker Dusch Date: Sat, 18 Feb 2012 11:36:11 +0100 Subject: [PATCH] Skip tests if mbstring is not installed --- tests/Composer/Test/Json/JsonFileTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Composer/Test/Json/JsonFileTest.php b/tests/Composer/Test/Json/JsonFileTest.php index 00711bb11..fc205eceb 100644 --- a/tests/Composer/Test/Json/JsonFileTest.php +++ b/tests/Composer/Test/Json/JsonFileTest.php @@ -133,6 +133,9 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase public function testUnicode() { + if (!function_exists('mb_convert_encoding')) { + $this->markTestSkipped('Test requires the mbstring extension'); + } $data = array("Žluťoučký \" kůň" => "úpěl ďábelské ódy za €"); $json = '{ "Žluťoučký \" kůň": "úpěl ďábelské ódy za €" @@ -143,6 +146,9 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase public function testEscapedSlashes() { + if (!function_exists('mb_convert_encoding')) { + $this->markTestSkipped('Test requires the mbstring extension'); + } $data = "\\/fooƌ"; $this->assertJsonFormat('"\\\\\\/fooƌ"', $data, JSON_UNESCAPED_UNICODE);