summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php4
-rw-r--r--tests/lib/User/SessionTest.php12
2 files changed, 4 insertions, 12 deletions
diff --git a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
index f8db85a9358..786bac6d856 100644
--- a/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
+++ b/tests/lib/AppFramework/Middleware/Security/BruteForceMiddlewareTest.php
@@ -70,7 +70,7 @@ class BruteForceMiddlewareTest extends TestCase {
->willReturn('127.0.0.1');
$this->throttler
->expects($this->once())
- ->method('sleepDelay')
+ ->method('sleepDelayOrThrowOnMax')
->with('127.0.0.1', 'login');
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
@@ -92,7 +92,7 @@ class BruteForceMiddlewareTest extends TestCase {
->method('getRemoteAddress');
$this->throttler
->expects($this->never())
- ->method('sleepDelay');
+ ->method('sleepDelayOrThrowOnMax');
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */
$controller = $this->createMock(Controller::class);
diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php
index 48c4785bf71..8fd94ffc004 100644
--- a/tests/lib/User/SessionTest.php
+++ b/tests/lib/User/SessionTest.php
@@ -1264,12 +1264,8 @@ class SessionTest extends \Test\TestCase {
$this->throttler
->expects($this->once())
->method('sleepDelay')
- ->with('192.168.0.1');
- $this->throttler
- ->expects($this->any())
- ->method('getDelay')
->with('192.168.0.1')
- ->willReturn(0);
+ ->willReturn(5);
$this->timeFactory
->expects($this->any())
->method('getTime')
@@ -1318,12 +1314,8 @@ class SessionTest extends \Test\TestCase {
$this->throttler
->expects($this->once())
->method('sleepDelay')
- ->with('192.168.0.1');
- $this->throttler
- ->expects($this->any())
- ->method('getDelay')
->with('192.168.0.1')
- ->willReturn(0);
+ ->willReturn(5);
$this->timeFactory
->expects($this->any())
->method('getTime')