Merge pull request #310 from edorian/test-skip-mbstring
Skip tests if mbstring is not installedpull/311/merge
commit
1d15e64205
|
@ -133,6 +133,9 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testUnicode()
|
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 €");
|
$data = array("Žluťoučký \" kůň" => "úpěl ďábelské ódy za €");
|
||||||
$json = '{
|
$json = '{
|
||||||
"Žluťoučký \" kůň": "úpěl ďábelské ódy za €"
|
"Žluťoučký \" kůň": "úpěl ďábelské ódy za €"
|
||||||
|
@ -143,6 +146,9 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
public function testEscapedSlashes()
|
public function testEscapedSlashes()
|
||||||
{
|
{
|
||||||
|
if (!function_exists('mb_convert_encoding')) {
|
||||||
|
$this->markTestSkipped('Test requires the mbstring extension');
|
||||||
|
}
|
||||||
$data = "\\/fooƌ";
|
$data = "\\/fooƌ";
|
||||||
|
|
||||||
$this->assertJsonFormat('"\\\\\\/fooƌ"', $data, JSON_UNESCAPED_UNICODE);
|
$this->assertJsonFormat('"\\\\\\/fooƌ"', $data, JSON_UNESCAPED_UNICODE);
|
||||||
|
|
Loading…
Reference in New Issue