Fix Nextcloud19 compatibility

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-04-28 09:59:53 +02:00
parent aa178f9e25
commit f585fbc391
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
2 changed files with 3 additions and 3 deletions

View File

@ -116,7 +116,7 @@ class RateLimitingMiddleware extends Middleware {
'core', 'core',
'429', '429',
[], [],
TemplateResponse::RENDER_AS_GUEST 'guest'
); );
$response->setStatus($exception->getCode()); $response->setStatus($exception->getCode());
} }

View File

@ -232,7 +232,7 @@ class RateLimitingMiddlewareTest extends TestCase {
$this->rateLimitingMiddleware->beforeController($controller, 'testMethod'); $this->rateLimitingMiddleware->beforeController($controller, 'testMethod');
} }
public function testAfterExceptionWithOtherException() { public function testAfterExceptionWithOtherException() {
$this->expectException(\Exception::class); $this->expectException(\Exception::class);
$this->expectExceptionMessage('My test exception'); $this->expectExceptionMessage('My test exception');
@ -272,7 +272,7 @@ class RateLimitingMiddlewareTest extends TestCase {
'core', 'core',
'429', '429',
[], [],
TemplateResponse::RENDER_AS_GUEST 'guest'
); );
$expected->setStatus(429); $expected->setStatus(429);
$this->assertEquals($expected, $result); $this->assertEquals($expected, $result);