Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Google\TwoFactorProviderTest::getSession PHP Method

getSession() private method

private getSession ( PHPUnit_Framework_MockObject_MockObject $flashBag = null ) : PHPUnit_Framework_MockObject_MockObject
$flashBag PHPUnit_Framework_MockObject_MockObject
return PHPUnit_Framework_MockObject_MockObject
    private function getSession($flashBag = null)
    {
        $session = $this->createMock('Symfony\\Component\\HttpFoundation\\Session\\Session');
        $session->expects($this->any())->method('getFlashBag')->willReturn($flashBag ? $flashBag : $this->getFlashBag());
        return $session;
    }