Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Email\TwoFactorProviderTest::getAuthenticationContext PHP Method

getAuthenticationContext() private method

private getAuthenticationContext ( PHPUnit_Framework_MockObject_MockObject $user = null, PHPUnit_Framework_MockObject_MockObject $request = null, PHPUnit_Framework_MockObject_MockObject $session = null, boolean $useTrustedOption = true ) : PHPUnit_Framework_MockObject_MockObject
$user PHPUnit_Framework_MockObject_MockObject
$request PHPUnit_Framework_MockObject_MockObject
$session PHPUnit_Framework_MockObject_MockObject
$useTrustedOption boolean
return PHPUnit_Framework_MockObject_MockObject
    private function getAuthenticationContext($user = null, $request = null, $session = null, $useTrustedOption = true)
    {
        $authContext = $this->createMock('Scheb\\TwoFactorBundle\\Security\\TwoFactor\\AuthenticationContextInterface');
        $authContext->expects($this->any())->method('getUser')->willReturn($user ? $user : $this->getUser());
        $authContext->expects($this->any())->method('getRequest')->willReturn($request ? $request : $this->getRequest());
        $authContext->expects($this->any())->method('getSession')->willReturn($session ? $session : $this->getSession());
        $authContext->expects($this->any())->method('useTrustedOption')->willReturn($useTrustedOption);
        return $authContext;
    }