/** * */ public function testLoginWithLockedAccount() { $userProvider = $this->getUserProvider(); $user = $this->getUser(); $user->shouldReceive('isLocked')->once()->andReturn(true); $userProvider->shouldReceive('getByEmail')->once()->with('*****@*****.**')->andReturn($user); $options = ['throttling' => ['enabled' => true, 'max_attempts' => 5, 'lock_time' => 300]]; $gatekeeper = new Gatekeeper($this->getRequest(), $this->getResponse(), $this->getSession(), $userProvider, $this->getGroupProvider(), $options); $this->assertEquals(Gatekeeper::LOGIN_LOCKED, $gatekeeper->login('*****@*****.**', 'password')); }