/**
  * Create global mocked $Settings object.
  */
 function setUp()
 {
     parent::setUp();
     Mock::generate('GeneralSettings');
     $this->old_Settings_EvoFilemanUnitTestCase =& $GLOBALS['Settings'];
     $GLOBALS['Settings'] = new MockGeneralSettings();
     $GLOBALS['Settings']->setReturnValue('get', 1, array('fm_enable_roots_user'));
     $GLOBALS['Settings']->setReturnValue('get', '775', array('fm_default_chmod_dir'));
     $GLOBALS['Settings']->setReturnValue('get', '664', array('fm_default_chmod_file'));
 }
 /**
  * Setup global $DB as reference to member test_DB (test DB).
  */
 function setUp()
 {
     global $testDB_conf;
     if (!isset($testDB_conf['name'])) {
         die('Please set the DB name to use for tests in /tests/config.php or /tests/config.OVERRIDE.php. See $testDB_conf there..');
     }
     $this->test_DB = new EvoDbUnitTestCase_DB($testDB_conf);
     $this->test_DB->halt_on_error = false;
     parent::setUp();
     $this->old_DB =& $GLOBALS['DB'];
     $GLOBALS['DB'] =& $this->test_DB;
     // Init DB::connection_charset, required for $db_storage_charset
     // init_charsets('utf-8');
     // load_db_schema();
     global $db_storage_charset;
     $db_storage_charset = 'utf8';
     $this->test_DB->begin();
     $this->dropTestDbTables();
 }
 /**
  * Replace global $DB by MockDB instance
  */
 function setUp()
 {
     parent::setUp();
     $this->old_EvoPluginUnitTestCase_DB = $GLOBALS['DB'];
     $GLOBALS['DB'] = new MockDB($this);
 }