/**
  * @test
  * @return void
  */
 public function loggedinUserFoundInDbHasEqualMd5EncryptedPassword()
 {
     $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_sfregister.']['settings.']['encryptPassword'] = '******';
     $this->fixture->_set('settings', $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_sfregister.']['settings.']);
     $expected = 'myFancyPassword';
     $userId = $this->testingFramework->createAndLoginFrontEndUser('', array('password' => $expected));
     $userMock = $this->getMock('Evoweb\\SfRegister\\Domain\\Model\\FrontendUser');
     $userMock->expects($this->once())->method('getPassword')->will($this->returnValue(md5($expected)));
     $repositoryMock = $this->getMock('Evoweb\\SfRegister\\Domain\\Repository\\FrontendUserRepository', array(), array(), '', FALSE);
     $repositoryMock->expects($this->once())->method('findByUid')->with($userId)->will($this->returnValue($userMock));
     $this->fixture->injectUserRepository($repositoryMock);
     $this->assertTrue($this->fixture->isValid($expected));
 }