1
0
Fork 0

Skip tests if mbstring is not installed

pull/310/head
Volker Dusch 2012-02-18 11:36:11 +01:00
parent cac51b1baf
commit 9ede082371
1 changed files with 6 additions and 0 deletions

View File

@ -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);