is_admin = true; $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']); $GLOBALS['mod_strings'] = array(); $_REQUEST['name'] = 'test'; $_REQUEST['view'] = 'advanced_search'; $_REQUEST['view_package'] = 'test'; $_REQUEST['view_module'] = 'test'; $this->mbController = new ModuleBuilderController(); $_REQUEST['description'] = ''; $_REQUEST['author'] = ''; $_REQUEST['readme'] = ''; $_REQUEST['label'] = 'test'; $_REQUEST['key'] = 'test'; $this->mbController->action_SavePackage(); $this->mbController->action_SaveModule(); unset($_REQUEST['key']); unset($_REQUEST['label']); unset($_REQUEST['readme']); unset($_REQUEST['author']); unset($_REQUEST['description']); } public function tearDown() { $_REQUEST['package'] = 'test'; $_REQUEST['module'] = 'test'; $_REQUEST['view_module'] = 'test'; $_REQUEST['view_package']= 'test'; $this->mbController->action_DeleteModule(); unset($_REQUEST['view_module']); unset($_REQUEST['module']); $this->mbController->action_DeletePackage(); unset($_REQUEST['view_package']); unset($_REQUEST['package']); unset($this->mbController); unset($_REQUEST['view_module']); unset($_REQUEST['view_package']); unset($_REQUEST['view']); unset($_REQUEST['name']); unset($GLOBALS['mod_strings']); unset($GLOBALS['app_list_strings']); unset($GLOBALS['current_user']); SugarTestUserUtilities::removeAllCreatedAnonymousUsers(); } /** * testActionAdvancedSearchSaveForCustomModule * Tests that adding a search field to a custom module does not generate errors due to the module name not being * in beanList */ public function testActionAdvancedSearchSaveForCustomModule() { try { $this->mbController->action_searchViewSave(); } catch (Exception $e) { $this->fail('An exception has been raised: ' . $e->getMessage()); } $this->assertFileExists($this->filename); } } ?>