Оптимизация работы с Unicode в json

This commit is contained in:
Антон Н. Николаев
2021-01-15 09:16:39 +03:00
parent 13b8b4b611
commit 1e1f3743d8
6 changed files with 42 additions and 6 deletions
+11
View File
@@ -1052,6 +1052,17 @@ class ClientTest extends TestCase
->getPaymentInfo(Random::str(36));
}
public function testEncodeMultibyteData()
{
$instance = new TestClient();
$value = array('hello' => 'Привет', 'olleh' => 'سلام');
$result = $instance->encode($value);
self::assertTrue(strpos($result, 'Привет') !== false);
self::assertTrue(strpos($result, 'سلام') !== false);
}
public function testEncodeInvalidData()
{
$instance = new TestClient();