Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Google\Validation\GoogleCodeValidatorTest::checkCode_validateCode_returnAuthenticatorResult PHP Method

checkCode_validateCode_returnAuthenticatorResult() public method

    public function checkCode_validateCode_returnAuthenticatorResult()
    {
        $user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\Google\\TwoFactorInterface');
        $this->authenticator->expects($this->once())->method('checkCode')->with($user, 'c0de')->willReturn(true);
        $returnValue = $this->validator->checkCode($user, 'c0de');
        $this->assertTrue($returnValue);
    }