Beispiel #1
0
 public function tearDown()
 {
     SugarTestProjectUtilities::removeAllCreatedProjects();
     SugarTestProjectTaskUtilities::removeAllCreatedProjectTasks();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($this->project);
     unset($this->projectTasks);
     unset($this->_user);
     unset($GLOBALS['current_user']);
 }
Beispiel #2
0
 public function tearDown()
 {
     if (!empty($this->_savedSearchDefs)) {
         file_put_contents("custom/modules/ProjectTask/metadata/searchdefs.php", $this->_savedSearchDefs);
     } else {
         @unlink("custom/modules/ProjectTask/metadata/searchdefs.php");
     }
     if (!empty($this->_savedSearchFields)) {
         file_put_contents("modules/ProjectTask/metadata/SearchFields.php", $this->_savedSearchFields);
     } else {
         @unlink("modules/ProjectTask/metadata/SearchFields.php");
     }
     SugarTestProjectTaskUtilities::removeAllCreatedProjectTasks();
     SugarTestProjectUtilities::removeAllCreatedProjects();
     SugarTestAccountUtilities::removeAllCreatedAccounts();
     $this->relationships->delete($this->relationship->getName());
     $this->relationships->save();
     parent::tearDown();
     SugarCache::$isCacheReset = false;
     SugarTestHelper::tearDown();
     $GLOBALS['reload_vardefs'] = true;
     $bean = new ProjectTask();
     unset($GLOBALS['reload_vardefs']);
 }