public function setUp()
 {
     Utils::setDefaultTimezonePHPini();
     parent::setUp();
     $optiondao = new OptionMySQLDAO();
     $this->pdo = OptionMySQLDAO::$PDO;
     $this->install_dir = THINKUP_ROOT_PATH . 'webapp/test_installer';
     $this->installs_dir = THINKUP_ROOT_PATH . 'build';
     // Make sure test_installer and build directories exists
     if (!file_exists($this->install_dir)) {
         exec('mkdir ' . $this->install_dir);
     }
     if (!file_exists($this->installs_dir)) {
         exec('mkdir ' . $this->installs_dir);
     }
     //Clean up files from test installation
     exec('rm -rf ' . THINKUP_ROOT_PATH . 'webapp/test_installer' . '/*');
     $config = Config::getInstance();
     $this->table_prefix = $config->getValue('table_prefix');
     // in case we exit without a teardown..
     $this->tearDown();
     $this->restart();
     $this->latest_build_made = false;
     //so we only create th elatest build zip once...
 }
 public function setUp()
 {
     parent::setUp();
     require THINKUP_WEBAPP_PATH . 'config.inc.php';
     global $TEST_DATABASE;
     //Override default CFG values
     $THINKUP_CFG['db_name'] = $TEST_DATABASE;
     $this->db = new Database($THINKUP_CFG);
     $this->conn = $this->db->getConnection();
     $this->testdb_helper = new ThinkUpTestDatabaseHelper();
     $this->testdb_helper->create($this->db);
 }
 public function setUp()
 {
     parent::setUp();
     global $THINKUP_CFG;
     //Make sure test_installer directory exists
     chdir(dirname(__FILE__) . '/../');
     if (!file_exists($THINKUP_CFG['source_root_path'] . '/webapp/test_installer/')) {
         @exec('mkdir webapp/test_installer/');
         @exec('chmod -R 777 webapp/test_installer/');
     }
     //Generate new user distribution based on current state of the tree
     @exec('extras/scripts/generate-distribution');
 }
 public function setUp()
 {
     parent::setUp();
     require THINKUP_WEBAPP_PATH . 'config.inc.php';
     $config = Config::getInstance();
     if ($config->getValue('timezone')) {
         date_default_timezone_set($config->getValue('timezone'));
     }
     //Override default CFG values
     $THINKUP_CFG['db_name'] = $this->test_database_name;
     $this->testdb_helper = new ThinkUpTestDatabaseHelper();
     $this->testdb_helper->create($THINKUP_CFG['source_root_path'] . "webapp/install/sql/build-db_mysql.sql");
 }
 public function setUp()
 {
     parent::setUp();
     //Make sure test_installer directory exists
     if (!file_exists($THINKUP_CFG['source_root_path'] . 'webapp/test_installer/')) {
         exec('mkdir webapp/test_installer/');
     }
     //Clean up files from test installation
     exec('rm -rf webapp/test_installer/*');
     //Generate new user distribution based on current state of the tree
     exec('extras/scripts/generate-distribution');
     //Extract into test_installer directory and set necessary folder permissions
     exec('cp build/thinkup.zip webapp/test_installer/.;' . 'cd webapp/test_installer/;' . 'unzip thinkup.zip;chmod -R 777 thinkup');
 }
 public function setUp()
 {
     date_default_timezone_set('America/Los_Angeles');
     parent::setUp();
     $optiondao = new OptionMySQLDAO();
     $this->pdo = OptionMysqlDAO::$PDO;
     $this->install_dir = THINKUP_ROOT_PATH . 'webapp/test_installer';
     $this->installs_dir = THINKUP_ROOT_PATH . 'build';
     // Make sure test_installer and build directories exists
     if (!file_exists($this->install_dir)) {
         exec('mkdir ' . $this->install_dir);
     }
     if (!file_exists($this->installs_dir)) {
         exec('mkdir ' . $this->installs_dir);
     }
     //Clean up files from test installation
     exec('rm -rf ' . THINKUP_ROOT_PATH . 'webapp/test_installer' . '/*');
     $config = Config::getInstance();
     $this->prefix = $config->getValue('table_prefix');
 }