diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-30 18:43:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-30 18:43:01 +0200 |
commit | 57f9117843afe403b8324a9e73c83c4849b3143b (patch) | |
tree | 095d3ab9c9257727d4cfb7d45ea5d442ef2dc24d /tests | |
parent | 2a6193e7aadbf41d454f4002773191cc503696b4 (diff) | |
parent | 6c93fe08f53bff474921d150edabb27ca630edd7 (diff) | |
download | nextcloud-server-57f9117843afe403b8324a9e73c83c4849b3143b.tar.gz nextcloud-server-57f9117843afe403b8324a9e73c83c4849b3143b.zip |
Merge pull request #1087 from nextcloud/get-delay-twice
dont get bruteforce delay twice
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/User/SessionTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index 379c7e39442..4b8067117b1 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -371,7 +371,7 @@ class SessionTest extends \Test\TestCase { ->with('token_auth_enforced', false) ->will($this->returnValue(true)); $request - ->expects($this->exactly(2)) + ->expects($this->any()) ->method('getRemoteAddress') ->willReturn('192.168.0.1'); $this->throttler @@ -379,7 +379,7 @@ class SessionTest extends \Test\TestCase { ->method('sleepDelay') ->with('192.168.0.1'); $this->throttler - ->expects($this->once()) + ->expects($this->any()) ->method('getDelay') ->with('192.168.0.1') ->willReturn(0); @@ -412,7 +412,7 @@ class SessionTest extends \Test\TestCase { ->method('set') ->with('app_password', 'I-AM-AN-APP-PASSWORD'); $request - ->expects($this->exactly(2)) + ->expects($this->any()) ->method('getRemoteAddress') ->willReturn('192.168.0.1'); $this->throttler @@ -420,7 +420,7 @@ class SessionTest extends \Test\TestCase { ->method('sleepDelay') ->with('192.168.0.1'); $this->throttler - ->expects($this->once()) + ->expects($this->any()) ->method('getDelay') ->with('192.168.0.1') ->willReturn(0); @@ -459,7 +459,7 @@ class SessionTest extends \Test\TestCase { ->will($this->returnValue(true)); $request - ->expects($this->exactly(2)) + ->expects($this->any()) ->method('getRemoteAddress') ->willReturn('192.168.0.1'); $this->throttler @@ -467,7 +467,7 @@ class SessionTest extends \Test\TestCase { ->method('sleepDelay') ->with('192.168.0.1'); $this->throttler - ->expects($this->once()) + ->expects($this->any()) ->method('getDelay') ->with('192.168.0.1') ->willReturn(0); |