Scheb\TwoFactorBundle\Tests\Security\TwoFactor\EventListener\InteractiveLoginListenerTest::createEvent PHP Method

createEvent() private method

private createEvent ( $token, $clientIp ) : PHPUnit_Framework_MockObject_MockObject
return PHPUnit_Framework_MockObject_MockObject
    private function createEvent($token, $clientIp)
    {
        $this->request = $this->createMock('Symfony\\Component\\HttpFoundation\\Request');
        $this->request->expects($this->any())->method('getClientIp')->willReturn($clientIp);
        $event = $this->createMock('Symfony\\Component\\Security\\Http\\Event\\InteractiveLoginEvent');
        $event->expects($this->any())->method('getRequest')->willReturn($this->request);
        $event->expects($this->any())->method('getAuthenticationToken')->willReturn($token);
        return $event;
    }