summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/AppFramework/Http/ResponseTest.php5
-rw-r--r--tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php4
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php
index d8959face89..9267d862600 100644
--- a/tests/lib/AppFramework/Http/ResponseTest.php
+++ b/tests/lib/AppFramework/Http/ResponseTest.php
@@ -269,4 +269,9 @@ class ResponseTest extends \Test\TestCase {
$this->childResponse->throttle();
$this->assertTrue($this->childResponse->isThrottled());
}
+
+ public function testGetThrottleMetadata() {
+ $this->childResponse->throttle(['foo' => 'bar']);
+ $this->assertSame(['foo' => 'bar'], $this->childResponse->getThrottleMetadata());
+ }
}
diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
index 14d3b796846..ae2345764ff 100644
--- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
@@ -112,6 +112,10 @@ class BruteForceMiddlewareTest extends TestCase {
->expects($this->once())
->method('isThrottled')
->willReturn(true);
+ $response
+ ->expects($this->once())
+ ->method('getThrottleMetadata')
+ ->willReturn([]);
$this->reflector
->expects($this->once())
->method('getAnnotationParameter')