summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Security/Bruteforce/CapabilitiesTest.php8
-rw-r--r--tests/lib/Security/Bruteforce/ThrottlerTest.php2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/Security/Bruteforce/CapabilitiesTest.php b/tests/lib/Security/Bruteforce/CapabilitiesTest.php
index d3463d307c0..266acdcb285 100644
--- a/tests/lib/Security/Bruteforce/CapabilitiesTest.php
+++ b/tests/lib/Security/Bruteforce/CapabilitiesTest.php
@@ -25,8 +25,8 @@ declare(strict_types=1);
namespace Test\Security\Bruteforce;
use OC\Security\Bruteforce\Capabilities;
-use OC\Security\Bruteforce\Throttler;
use OCP\IRequest;
+use OCP\Security\Bruteforce\IThrottler;
use Test\TestCase;
class CapabilitiesTest extends TestCase {
@@ -36,7 +36,7 @@ class CapabilitiesTest extends TestCase {
/** @var IRequest|\PHPUnit\Framework\MockObject\MockObject */
private $request;
- /** @var Throttler|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IThrottler|\PHPUnit\Framework\MockObject\MockObject */
private $throttler;
protected function setUp(): void {
@@ -44,7 +44,7 @@ class CapabilitiesTest extends TestCase {
$this->request = $this->createMock(IRequest::class);
- $this->throttler = $this->createMock(Throttler::class);
+ $this->throttler = $this->createMock(IThrottler::class);
$this->capabilities = new Capabilities(
$this->request,
@@ -59,7 +59,7 @@ class CapabilitiesTest extends TestCase {
->willReturn(42);
$this->throttler->expects($this->atLeastOnce())
- ->method('isIPWhitelisted')
+ ->method('isBypassListed')
->with('10.10.10.10')
->willReturn(true);
diff --git a/tests/lib/Security/Bruteforce/ThrottlerTest.php b/tests/lib/Security/Bruteforce/ThrottlerTest.php
index e7fd12645e1..e368a0912b1 100644
--- a/tests/lib/Security/Bruteforce/ThrottlerTest.php
+++ b/tests/lib/Security/Bruteforce/ThrottlerTest.php
@@ -185,7 +185,7 @@ class ThrottlerTest extends TestCase {
$this->assertSame(
($enabled === false) ? true : $isWhiteListed,
- self::invokePrivate($this->throttler, 'isIPWhitelisted', [$ip])
+ self::invokePrivate($this->throttler, 'isBypassListed', [$ip])
);
}