瀏覽代碼

Skip test requiring mbstring when it's not installed

Sylvain Filteau 11 年之前
父節點
當前提交
92e283973f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      tests/Composer/Test/Json/JsonFormatterTest.php

+ 4 - 0
tests/Composer/Test/Json/JsonFormatterTest.php

@@ -22,6 +22,10 @@ class JsonFormatterTest extends \PHPUnit_Framework_TestCase
      */
     public function testUnicodeWithPrependedSlash()
     {
+	if (!extension_loaded('mbstring')) {
+		$this->markTestSkipped('Test requires the mbstring extension');
+	}
+
         $data = '"' . chr(92) . chr(92) . chr(92) . 'u0119"';
         $encodedData = JsonFormatter::format($data, true, true);
         $expected = '34+92+92+196+153+34';