Ejemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     PluginManager::instance()->invalidateCache();
     PluginFactory::clearInstance();
     $this->old_globals = $GLOBALS;
     $GLOBALS['feedback'] = '';
     $GLOBALS['svn_prefix'] = '/tmp';
     $GLOBALS['cvs_prefix'] = '/tmp';
     $GLOBALS['grpdir_prefix'] = '/tmp';
     $GLOBALS['ftp_frs_dir_prefix'] = '/tmp';
     $GLOBALS['ftp_anon_dir_prefix'] = '/tmp';
     $GLOBALS['sys_default_domain'] = '';
     $GLOBALS['sys_cookie_prefix'] = '';
     $GLOBALS['sys_force_ssl'] = 0;
     ForgeConfig::store();
     $this->old_sys_pluginsroot = $GLOBALS['sys_pluginsroot'];
     $this->old_sys_custompluginsroot = $GLOBALS['sys_custompluginsroot'];
     $GLOBALS['sys_pluginsroot'] = dirname(__FILE__) . '/../../plugins/';
     $GLOBALS['sys_custompluginsroot'] = "/tmp";
     ForgeConfig::set('tuleap_dir', __DIR__ . '/../../');
     ForgeConfig::set('codendi_log', "/tmp/");
     /**
      * HACK
      */
     require_once dirname(__FILE__) . '/../../plugins/fusionforge_compat/include/fusionforge_compatPlugin.class.php';
     $ff_plugin = new fusionforge_compatPlugin();
     $ff_plugin->loaded();
     PluginManager::instance()->installAndActivate('mediawiki');
     $plugin = PluginManager::instance()->getPluginByName('mediawiki');
     EventManager::instance()->addListener(Event::IMPORT_XML_PROJECT, $plugin, 'importXmlProject', false);
     EventManager::instance()->addListener('register_project_creation', $plugin, 'register_project_creation', false);
     EventManager::instance()->addListener(Event::SERVICES_ALLOWED_FOR_PROJECT, $plugin, 'services_allowed_for_project', false);
     putenv('TULEAP_LOCAL_INC=' . dirname(__FILE__) . '/_fixtures/local.inc');
 }
Ejemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $this->dao = new Tracker_Artifact_PriorityDao();
     $this->truncateTable('tracker_artifact_priority');
     $this->mysqli->query('INSERT INTO tracker_artifact_priority (curr_id, succ_id, rank) VALUES (NULL, NULL, 0)');
 }
Ejemplo n.º 3
0
 public function setUp() {
     parent::setUp();
     $GLOBALS['feedback'] = '';
     $GLOBALS['svn_prefix'] = '/tmp';
     $GLOBALS['cvs_prefix'] = '/tmp';
     $GLOBALS['grpdir_prefix'] = '/tmp';
     $GLOBALS['ftp_frs_dir_prefix'] = '/tmp';
     $GLOBALS['ftp_anon_dir_prefix'] = '/tmp';
     $GLOBALS['sys_default_domain'] = '';
     $GLOBALS['sys_cookie_prefix'] = '';
     $GLOBALS['sys_force_ssl'] = 0;
 }
Ejemplo n.º 4
0
 public function setUp()
 {
     parent::setUp();
     ForgeConfig::store();
     ForgeConfig::set('codendi_log', dirname(__FILE__));
     if (!self::$defect_tracker_converted && $this->thisTestIsNotUnderDevelopment()) {
         $this->convertTrackers();
     }
     $this->form_element_factory = Tracker_FormElementFactory::instance();
     $this->tracker_factory = TrackerFactory::instance();
     $this->defect_tracker = $this->tracker_factory->getTrackerById(self::$defect_tracker_id);
     $this->task_tracker = $this->tracker_factory->getTrackerById(self::$task_tracker_id);
 }
Ejemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     $GLOBALS['feedback'] = '';
     $GLOBALS['svn_prefix'] = '/tmp';
     $GLOBALS['cvs_prefix'] = '/tmp';
     $GLOBALS['grpdir_prefix'] = '/tmp';
     $GLOBALS['ftp_frs_dir_prefix'] = '/tmp';
     $GLOBALS['ftp_anon_dir_prefix'] = '/tmp';
     $GLOBALS['sys_default_domain'] = '';
     $GLOBALS['sys_cookie_prefix'] = '';
     $GLOBALS['sys_force_ssl'] = 0;
     ForgeConfig::store();
     ForgeConfig::set('tuleap_dir', __DIR__ . '/../../');
 }