public function setUp()
 {
     parent::setUp();
     $this->container = new StubBackendSingletonContainerImpl();
     $this->config = new StubConfigImpl();
     $this->config->setMailMysqlConnection(array('user' => self::$mailMySQLOptions->getUsername(), 'database' => self::$mailMySQLOptions->getDatabase(), 'host' => self::$mailMySQLOptions->getHost()));
     $this->mailPass = self::$mailMySQLOptions->getPassword();
     $this->databaseName = self::$mailMySQLOptions->getDatabase();
     $this->config->setMysqlConnection(array('user' => self::$mysqlOptions->getUsername(), 'database' => self::$mysqlOptions->getDatabase(), 'host' => self::$mysqlOptions->getHost(), 'password' => self::$mysqlOptions->getPassword(), 'folders' => []));
     $this->container->setConfigInstance($this->config);
     $this->db = new MySQLDBImpl($this->config);
     $this->container->setDBInstance($this->db);
     $this->userLibrary = new StubUserLibraryImpl();
     $this->container->setUserLibraryInstance($this->userLibrary);
     $this->domainLibrary = new DomainLibraryImpl($this->container);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->container = new StubBackendSingletonContainerImpl();
     $this->config = new StubConfigImpl();
     $this->config->setMailMysqlConnection(array('user' => self::$mailMySQLOptions->getUsername(), 'database' => self::$mailMySQLOptions->getDatabase(), 'host' => self::$mailMySQLOptions->getHost()));
     $this->mailPass = self::$mailMySQLOptions->getPassword();
     $this->config->setMysqlConnection(array('user' => self::$mysqlOptions->getUsername(), 'database' => self::$mysqlOptions->getDatabase(), 'host' => self::$mysqlOptions->getHost(), 'password' => self::$mysqlOptions->getPassword()));
     $this->container->setConfigInstance($this->config);
     $this->db = new StubDBImpl();
     $this->db->setConnection(self::$pdo);
     $this->container->setDBInstance($this->db);
     $this->userLibrary = new StubUserLibraryImpl();
     $this->container->setUserLibraryInstance($this->userLibrary);
     $this->domainLibrary = new DomainLibraryImpl($this->container);
     $this->domain = $this->domainLibrary->getDomain('test.dk');
     $this->addressLibrary = $this->domain->getAddressLibrary();
 }
 public function setUp()
 {
     parent::setUp();
     $this->container = new StubBackendSingletonContainerImpl();
     $this->config = new StubConfigImpl();
     $this->config->setMailMysqlConnection(array('user' => self::$mailMySQLOptions->getUsername(), 'database' => self::$mailMySQLOptions->getDatabase(), 'host' => self::$mailMySQLOptions->getHost()));
     $this->mailPass = self::$mailMySQLOptions->getPassword();
     $this->config->setMysqlConnection(array('user' => self::$mysqlOptions->getUsername(), 'database' => self::$mysqlOptions->getDatabase(), 'host' => self::$mysqlOptions->getHost(), 'password' => self::$mysqlOptions->getPassword(), 'folders' => []));
     $this->container->setConfigInstance($this->config);
     $this->db = new MySQLDBImpl($this->config);
     $this->container->setDBInstance($this->db);
     $this->databaseName = self::$mysqlOptions->getDatabase();
     $this->domainLib = new StubMailDomainLibraryImpl();
     $this->userLibrary = $userLibrary = new StubUserLibraryImpl();
     $this->container->setUserLibraryInstance($this->userLibrary);
     $this->domain = new DomainImpl($this->container, 'test.dk', $this->domainLib);
     $this->domain2 = new DomainImpl($this->container, 'test2.dk', $this->domainLib);
     $this->domainLib->setDomainList(['test.dk' => $this->domain, 'test2.dk' => $this->domain2]);
     $this->modTime = strtotime("2000-01-01 13:00:00");
     $this->creaTime = strtotime("2000-01-01 12:00:00");
     $this->nonCreatedDomain = new DomainImpl($this->container, 'non-existing.dk', $this->domainLib);
 }