public function checkCode_validateCode_returnBoolean($code, $expectedReturnValue)
{
//Mock the user object
$user = $this->createMock('Scheb\\TwoFactorBundle\\Model\\Google\\TwoFactorInterface');
$user->expects($this->once())->method('getGoogleAuthenticatorSecret')->willReturn('SECRET');
//Mock the Google class
$this->google->expects($this->once())->method('checkCode')->with('SECRET', $code)->willReturn($expectedReturnValue);
$authenticator = $this->createAuthenticator();
$returnValue = $authenticator->checkCode($user, $code);
$this->assertEquals($expectedReturnValue, $returnValue);
}