Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-05-27 15:57:22 +0300
committerJulius Härtl <jus@bitgrid.net>2022-05-30 20:17:49 +0300
commit3901a93c72ed7a008902a79fb5e0ee1de018f7bd (patch)
tree3c7c52f9bf19596028c5c25f3caf9ce33794dfcc /tests
parent7140201a322d5be30e899143a0482aaba05b7ade (diff)
Use JSON_THROW_ON_ERROR instead of custom error handlingbugfix/noid/json-throw
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Http/JSONResponseTest.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php
index 504876b2d88..8c8318eb602 100644
--- a/tests/lib/AppFramework/Http/JSONResponseTest.php
+++ b/tests/lib/AppFramework/Http/JSONResponseTest.php
@@ -88,10 +88,10 @@ class JSONResponseTest extends \Test\TestCase {
$this->assertEquals($expected, $this->json->render());
}
-
+
public function testRenderWithNonUtf8Encoding() {
- $this->expectException(\Exception::class);
- $this->expectExceptionMessage('Could not json_encode due to invalid non UTF-8 characters in the array: array (');
+ $this->expectException(\JsonException::class);
+ $this->expectExceptionMessage('Malformed UTF-8 characters, possibly incorrectly encoded');
$params = ['test' => hex2bin('e9')];
$this->json->setData($params);