summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-05-31 10:06:21 +0200
committerGitHub <noreply@github.com>2022-05-31 10:06:21 +0200
commitcf9660fdf055cbc12d7c06f641843f1c3754f797 (patch)
tree88e62ee655bff03c77682214e4a6206364fcc53d /tests
parentcf9d0b123a8947309febe932aa75b4036d69482f (diff)
parent3901a93c72ed7a008902a79fb5e0ee1de018f7bd (diff)
downloadnextcloud-server-cf9660fdf055cbc12d7c06f641843f1c3754f797.tar.gz
nextcloud-server-cf9660fdf055cbc12d7c06f641843f1c3754f797.zip
Merge pull request #32628 from nextcloud/bugfix/noid/json-throw
Use JSON_THROW_ON_ERROR instead of custom error handling
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);