/**
  * @test
  */
 public function checkCode_validateCode_returnAuthenticatorResult()
 {
     $user = $this->getMock("Scheb\\TwoFactorBundle\\Model\\Google\\TwoFactorInterface");
     $this->authenticator->expects($this->once())->method("checkCode")->with($user, "c0de")->will($this->returnValue(true));
     $returnValue = $this->validator->checkCode($user, "c0de");
     $this->assertTrue($returnValue);
 }
 /**
  * @test
  */
 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);
 }