public function testPasswordGetterAndSetter()
 {
     $origin = new ImapEmailOrigin();
     $this->assertNull($origin->getPassword());
     $origin->setPassword('test');
     $this->assertEquals('test', $origin->getPassword());
 }
 /**
  * Creates a processor is used to synchronize emails
  *
  * @param ImapEmailOrigin $origin
  * @return ImapEmailSynchronizationProcessor
  */
 protected function createSynchronizationProcessor($origin)
 {
     $config = new ImapConfig($origin->getHost(), $origin->getPort(), $origin->getSsl(), $origin->getUser(), $this->encryptor->decryptData($origin->getPassword()));
     return $this->syncProcessorFactory->create(new ImapEmailManager($this->connectorFactory->createImapConnector($config)), $this->getKnownEmailAddressChecker());
 }
 /**
  * Creates a processor is used to synchronize emails
  *
  * @param ImapEmailOrigin $origin
  * @return ImapEmailSynchronizationProcessor
  */
 protected function createSynchronizationProcessor($origin)
 {
     $config = new ImapConfig($origin->getHost(), $origin->getPort(), $origin->getSsl(), $origin->getUser(), $this->encryptor->decryptData($origin->getPassword()));
     return new ImapEmailSynchronizationProcessor($this->log, $this->getEntityManager(), $this->emailEntityBuilder, $this->emailAddressManager, $this->knownEmailAddressChecker, new ImapEmailManager($this->connectorFactory->createImapConnector($config)));
 }
 /**
  * @param ImapEmailOrigin $origin
  *
  * @return ImapEmailFolderManager
  */
 protected function createManager(ImapEmailOrigin $origin)
 {
     $config = new ImapConfig($origin->getHost(), $origin->getPort(), $origin->getSsl(), $origin->getUser(), $this->mcrypt->decryptData($origin->getPassword()));
     $connector = $this->connectorFactory->createImapConnector($config);
     return new ImapEmailFolderManager($connector, $this->doctrine->getManager(), $origin);
 }