Scheb\TwoFactorBundle\Tests\Security\TwoFactor\Provider\Email\Validation\EmailCodeValidatorTest::checkCode_validateCode_returnBoolean PHP Метод

checkCode_validateCode_returnBoolean() публичный Метод

public checkCode_validateCode_returnBoolean ( $code, $input, $expectedReturnValue )
    public function checkCode_validateCode_returnBoolean($code, $input, $expectedReturnValue)
    {
        //Mock the user object
        $user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\Email\\TwoFactorInterface');
        $user->expects($this->once())->method('getEmailAuthCode')->willReturn($code);
        $returnValue = $this->validator->checkCode($user, $input);
        $this->assertEquals($expectedReturnValue, $returnValue);
    }