protected function mockEncryptionAdapter()
{
$encryption = $this->getMock('Contao\\CoreBundle\\Framework\\Adapter', ['hash'], ['Contao\\Encryption']);
$encryption->expects($this->any())->method('hash')->willReturnCallback(function ($password) {
return 'HA$HED-' . $password . '-HA$HED';
});
return $encryption;
}