/**
  *
  * @param array $param
  *  Expected key/ values:
  *      project_id  int             The ID of the project for the import
  *      xml_content SimpleXmlObject A string of valid xml
  *      mapping     array           An array of mappings between xml tracker IDs and their true IDs
  *
  */
 public function import_xml_project_cardwall_done($params)
 {
     $request = new HTTPRequest($params);
     $request->set('action', 'import');
     $request->set('xml_content', $params['xml_content']);
     $request->set('mapping', $params['mapping']);
     $request->set('project_id', $params['project_id']);
     $this->process($request);
 }
Beispiel #2
0
 public function itForbidsGerritMigrationIfTuleapIsNotConnectedToLDAP()
 {
     ForgeConfig::set('sys_auth_type', 'not_ldap');
     $factory = stub('GitRepositoryFactory')->getRepositoryById()->returns(mock('GitRepository'));
     stub($this->user_manager)->getCurrentUser()->returns($this->admin);
     $request = new HTTPRequest();
     $repo_id = 999;
     $server_id = 111;
     $request->set('repo_id', $repo_id);
     $request->set('remote_server_id', $server_id);
     $git = $this->getGit($request, $factory);
     $git->expectNever('addAction');
     $git->expectOnce('redirect', array('/plugins/git/?group_id=' . $this->group_id));
     $git->request();
 }