Fix Nextcloud19 compatibility
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
aa178f9e25
commit
f585fbc391
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue