Cartalyst\Sentinel\Checkpoints\ThrottleCheckpoint::login PHP Method

login() public method

{@inheritDoc}
public login ( Cartalyst\Sentinel\Users\UserInterface $user )
$user Cartalyst\Sentinel\Users\UserInterface
    public function login(UserInterface $user)
    {
        return $this->checkThrottling('login', $user);
    }

Usage Example

コード例 #1
0
 /**
  * @expectedException \Cartalyst\Sentinel\Checkpoints\ThrottlingException
  */
 public function testFailedLogin()
 {
     $checkpoint = new ThrottleCheckpoint($throttle = m::mock('Cartalyst\\Sentinel\\Throttling\\IlluminateThrottleRepository'));
     $throttle->shouldReceive('globalDelay')->once()->andReturn(10);
     $checkpoint->login(m::mock('Cartalyst\\Sentinel\\Users\\EloquentUser'));
 }