mirror of
https://github.com/composer/composer
synced 2025-05-11 09:32:55 +00:00
Skip test requiring mbstring when it's not installed
This commit is contained in:
parent
fff913d6de
commit
92e283973f
1 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,10 @@ class JsonFormatterTest extends \PHPUnit_Framework_TestCase
|
||||||
*/
|
*/
|
||||||
public function testUnicodeWithPrependedSlash()
|
public function testUnicodeWithPrependedSlash()
|
||||||
{
|
{
|
||||||
|
if (!extension_loaded('mbstring')) {
|
||||||
|
$this->markTestSkipped('Test requires the mbstring extension');
|
||||||
|
}
|
||||||
|
|
||||||
$data = '"' . chr(92) . chr(92) . chr(92) . 'u0119"';
|
$data = '"' . chr(92) . chr(92) . chr(92) . 'u0119"';
|
||||||
$encodedData = JsonFormatter::format($data, true, true);
|
$encodedData = JsonFormatter::format($data, true, true);
|
||||||
$expected = '34+92+92+196+153+34';
|
$expected = '34+92+92+196+153+34';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue