Ejemplo n.º 1
0
 /**
  * @param ImapConfig $config
  * @return Imap
  */
 protected function getDefaultImapStorage(ImapConfig $config)
 {
     $params = array('host' => $config->getHost(), 'port' => $config->getPort(), 'ssl' => $config->getSsl(), 'user' => $config->getUser(), 'password' => $config->getPassword(), 'accessToken' => $config->getAccessToken());
     $defaultImapStorageClass = $this->defaultImapServices[0];
     return new $defaultImapStorageClass($params);
 }
Ejemplo n.º 2
0
 public function testSettersAndGetters()
 {
     $obj = new ImapConfig();
     $host = 'testHost';
     $port = 'testPort';
     $ssl = 'testSsl';
     $user = '******';
     $password = '******';
     $token = 'testToken';
     $obj->setHost($host);
     $obj->setPort($port);
     $obj->setSsl($ssl);
     $obj->setUser($user);
     $obj->setPassword($password);
     $obj->setAccessToken($token);
     $this->assertEquals($host, $obj->getHost());
     $this->assertEquals($port, $obj->getPort());
     $this->assertEquals($ssl, $obj->getSsl());
     $this->assertEquals($user, $obj->getUser());
     $this->assertEquals($password, $obj->getPassword());
     $this->assertEquals($token, $obj->getAccessToken());
 }