Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Google\GoogleAuthenticatorTest::getUrl_createQrCodeUrl_returnUrl PHP Method

getUrl_createQrCodeUrl_returnUrl() public method

public getUrl_createQrCodeUrl_returnUrl ( $hostname, $issuer, $expectedUrl )
    public function getUrl_createQrCodeUrl_returnUrl($hostname, $issuer, $expectedUrl)
    {
        //Mock the user object
        $user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\Google\\TwoFactorInterface');
        $user->expects($this->once())->method('getUsername')->willReturn('User name');
        $user->expects($this->once())->method('getGoogleAuthenticatorSecret')->willReturn('SECRET');
        $authenticator = $this->createAuthenticator($hostname, $issuer);
        $returnValue = $authenticator->getUrl($user);
        $this->assertEquals($expectedUrl, $returnValue);
    }