|
|
|
|
|
|
|
|
->willReturn('127.0.0.1'); |
|
|
->willReturn('127.0.0.1'); |
|
|
$this->throttler |
|
|
$this->throttler |
|
|
->expects($this->once()) |
|
|
->expects($this->once()) |
|
|
->method('sleepDelay') |
|
|
|
|
|
|
|
|
->method('sleepDelayOrThrowOnMax') |
|
|
->with('127.0.0.1', 'login'); |
|
|
->with('127.0.0.1', 'login'); |
|
|
|
|
|
|
|
|
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ |
|
|
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ |
|
|
|
|
|
|
|
|
->method('getRemoteAddress'); |
|
|
->method('getRemoteAddress'); |
|
|
$this->throttler |
|
|
$this->throttler |
|
|
->expects($this->never()) |
|
|
->expects($this->never()) |
|
|
->method('sleepDelay'); |
|
|
|
|
|
|
|
|
->method('sleepDelayOrThrowOnMax'); |
|
|
|
|
|
|
|
|
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ |
|
|
/** @var Controller|\PHPUnit\Framework\MockObject\MockObject $controller */ |
|
|
$controller = $this->createMock(Controller::class); |
|
|
$controller = $this->createMock(Controller::class); |