aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Http/JSONResponseTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/AppFramework/Http/JSONResponseTest.php')
-rw-r--r--tests/lib/AppFramework/Http/JSONResponseTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php
index a74bd67d1f0..95d2e2a0a4c 100644
--- a/tests/lib/AppFramework/Http/JSONResponseTest.php
+++ b/tests/lib/AppFramework/Http/JSONResponseTest.php
@@ -36,7 +36,7 @@ class JSONResponseTest extends \Test\TestCase {
*/
private $json;
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
$this->json = new JSONResponse();
}
@@ -89,11 +89,11 @@ class JSONResponseTest extends \Test\TestCase {
$this->assertEquals($expected, $this->json->render());
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Could not json_encode due to invalid non UTF-8 characters in the array: array (
- */
+
public function testRenderWithNonUtf8Encoding() {
+ $this->expectException(\Exception::class);
+ $this->expectExceptionMessage('Could not json_encode due to invalid non UTF-8 characters in the array: array (');
+
$params = ['test' => hex2bin('e9')];
$this->json->setData($params);
$this->json->render();