public function setUp()
 {
     $GLOBALS['Language'] = new ProjectCreatorTest_BaseLanguage();
     $this->event_manager = new MockSystemEventManager();
     $this->event_manager->setReturnValue('isUserNameAvailable', true);
     $this->event_manager->setReturnValue('isProjectNameAvailable', true);
     SystemEventManager::setInstance($this->event_manager);
     $this->project_manager = new MockProjectManager();
     $this->project_manager->setReturnValue('getProjectByUnixName', null);
     ProjectManager::setInstance($this->project_manager);
     $this->user_manager = new MockUserManager();
     $this->user_manager->setReturnValue('getUserByUserName', null);
     UserManager::setInstance($this->user_manager);
 }
 public function setUp()
 {
     parent::setUp();
     $GLOBALS['ftp_frs_dir_prefix'] = 'whatever';
     $GLOBALS['ftp_anon_dir_prefix'] = 'whatever';
     $GLOBALS['svn_prefix'] = 'whatever';
     $GLOBALS['cvs_prefix'] = 'whatever';
     $GLOBALS['grpdir_prefix'] = 'whatever';
     $template = stub('Project')->isTemplate()->returns(true);
     $user_manager = mock('UserManager');
     UserManager::setInstance($user_manager);
     $project_manager = mock('ProjectManager');
     ProjectManager::setInstance($project_manager);
     stub($project_manager)->getProject($this->template_id)->returns($template);
     $system_event_manager = mock('SystemEventManager');
     SystemEventManager::setInstance($system_event_manager);
     stub($system_event_manager)->isUserNameAvailable()->returns(true);
     stub($system_event_manager)->isProjectNameAvailable()->returns(true);
 }