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); }
public function setup() { $backend = new StubBackendSingletonContainerImpl(); $site = new StubSiteImpl(); $site->setVariables(new StubVariablesImpl()); $backend->setSiteInstance($site); $config = new StubConfigImpl(); $config->setFacebookAppCredentials(['id' => $GLOBALS['FB_APP_ID'], 'secret' => $GLOBALS['FB_APP_SECRET'], 'permanent_access_token' => $GLOBALS['FB_ACCESS_TOKEN']]); $config->setVariables(['facebook_page_id' => $GLOBALS['FB_PAGE_ID']]); $backend->setConfigInstance($config); $backend->setTmpFolder($f = new FolderImpl("/tmp/lenevemb.dk-test/")); $f->delete(Folder::DELETE_FOLDER_RECURSIVE); $script = new FacebookSessionInitializePreScriptImpl($backend); $script->run(Website::WEBSITE_SCRIPT_TYPE_PRESCRIPT, null); $this->page = new FacebookPageImpl($backend, $GLOBALS['FB_PAGE_ID']); }