/**
  * 
  * @dataProvider authenticationValidationMessages
  */
 public function testErrorMessages($errorCode, $errorKey, $errorMessage)
 {
     $authenticationResult = new Result($errorCode, 'testuser');
     $authenticationServiceMock = $this->getMock('UghAuthentication\\Authentication\\AuthenticationServiceInterface');
     $authenticationServiceMock->expects($this->once())->method('authenticate')->will($this->returnValue($authenticationResult));
     $authenticationValidator = new Authentication();
     $authenticationValidator->setService($authenticationServiceMock);
     $authenticationValidator->setIdentity('username');
     $result = $authenticationValidator->isValid();
     $this->assertFalse($result);
     $authenticationValidationMessages = $authenticationValidator->getMessages();
     $this->assertSame($errorMessage, $authenticationValidationMessages[$errorKey]);
 }