예제 #1
1
 public function setUp()
 {
     global $beanList, $beanFiles;
     include 'include/modules.php';
     //Reload langauge strings
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
     //Create an anonymous user for login purposes/
     $this->_user = new User();
     $this->_user->retrieve('1');
     $GLOBALS['current_user'] = $this->_user;
     self::$helperObject = new APIv3Helper();
     if (file_exists(sugar_cached('modules/unified_search_modules.php'))) {
         $this->unified_search_modules_content = file_get_contents(sugar_cached('modules/unified_search_modules.php'));
         unlink(sugar_cached('modules/unified_search_modules.php'));
     }
     require_once 'modules/Home/UnifiedSearchAdvanced.php';
     $unifiedSearchAdvanced = new UnifiedSearchAdvanced();
     $_REQUEST['enabled_modules'] = 'Accounts,Contacts,Opportunities';
     $unifiedSearchAdvanced->saveGlobalSearchSettings();
     $GLOBALS['db']->query("DELETE FROM accounts WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM opportunities WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM contacts WHERE first_name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM calls WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM tasks WHERE name like 'UNIT TEST%' ");
     $GLOBALS['db']->query("DELETE FROM meetings WHERE name like 'UNIT TEST%' ");
     //$this->useOutputBuffering = false;
 }
 protected function initSugar()
 {
     if (!defined('sugarEntry')) {
         define('sugarEntry', true);
     }
     require_once 'config.php';
     if (!empty($sugar_config)) {
         $GLOBALS['sugar_config'] = $sugar_config;
     }
     require_once 'include/entryPoint.php';
     require_once 'modules/Administration/QuickRepairAndRebuild.php';
     require_once 'include/MVC/SugarApplication.php';
     // Scope is messed up due to requiring files within a function
     // We need to explicitly assign these variables to $GLOBALS
     foreach (get_defined_vars() as $key => $val) {
         $GLOBALS[$key] = $val;
     }
     if (empty($current_language)) {
         $current_language = $sugar_config['default_language'];
     }
     return_app_list_strings_language($current_language);
     return_application_language($current_language);
     global $current_user;
     $current_user = new User();
     $current_user->getSystemUser();
 }
예제 #3
0
파일: Utils.php 프로젝트: kduqi/corebos
 static function initAppGlobals()
 {
     global $current_language, $app_strings, $app_list_strings, $app_currency_strings;
     $app_currency_strings = return_app_currency_strings_language($current_language);
     $app_strings = return_application_language($current_language);
     $app_list_strings = return_app_list_strings_language($current_language);
 }
예제 #4
0
 public function setUp()
 {
     global $mod_strings;
     $mod_strings = return_module_language($GLOBALS['current_language'], 'Leads');
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, 1);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
    function createAppStringsCache($lang = 'en_us')
    {
        global $sugar_config;
        $lst_mod = array('Accounts', 'Contacts', 'Opportunities', 'Leads', 'Calls', 'Meetings', 'Cases', 'Project', 'ProjectTask', 'Tasks', 'Notes');
        $required_list = $this->getListOfLists($lst_mod);
        // List of application list strings used in the application (enums)
        $app_strings = return_application_language($lang);
        $all_app_list_strings = return_app_list_strings_language($lang);
        $app_list_strings = array();
        foreach ($lst_mod as $key => $lst) {
            $app_list_strings["moduleList"][$lst] = $all_app_list_strings["moduleList"][$lst];
            $app_list_strings["moduleListSingular"][$lst] = isset($all_app_list_strings["moduleListSingular"][$lst]) ? $all_app_list_strings["moduleListSingular"][$lst] : $all_app_list_strings["moduleList"][$lst];
        }
        $app_list_strings["parent_type_display"] = $all_app_list_strings["parent_type_display"];
        $app_list_strings["duration_intervals"] = $all_app_list_strings["duration_intervals"];
        $app_list_strings["duration_dom"] = $all_app_list_strings["duration_dom"];
        $app_list_strings["moduleList"]["SavedSearches"] = $all_app_list_strings["moduleList"]["SavedSearch"];
        // date_range_search_dom in not defined until 6.2
        $app_list_strings["date_search"] = isset($all_app_list_strings["date_range_search_dom"]) ? $all_app_list_strings["date_range_search_dom"] : $all_app_list_strings["kbdocument_date_filter_options"];
        $app_list_strings["date_search"]['today'] = $app_strings['LBL_TODAY'];
        if (isset($all_app_list_strings["numeric_range_search_dom"])) {
            $app_list_strings["num_search"] = $all_app_list_strings["numeric_range_search_dom"];
        }
        foreach ($required_list as $lst) {
            $app_list_strings[$lst] = $all_app_list_strings[$lst];
        }
        $json = getJSONobj();
        $app_list_strings_encoded = str_replace('\\\\', "\\/", preg_replace("/'/", "'", $json->encode($app_list_strings)));
        $SS_mod_strings = return_module_language($lang, "SavedSearch");
        $ADM_mod_strings = return_module_language($lang, "Administration");
        $str = <<<EOQ
var RES_CREATE='{$app_strings['LBL_CREATE_BUTTON_LABEL']}',RES_LIST='{$app_strings['LBL_LIST']}',RES_ADD_TO_HOME='{$app_strings['LBL_MARK_AS_FAVORITES']}',RES_REM_FROM_HOME='{$app_strings['LBL_REMOVE_FROM_FAVORITES']}',RES_RECORD_ERROR='{$app_strings['ERROR_NO_RECORD']}',RES_LAST_VIEWED='{$app_strings['LBL_LAST_VIEWED']}', RES_DELETE_CONFIRMATION='{$app_strings['NTC_DELETE_CONFIRMATION']}', RES_DEL_LABEL='{$app_strings['LBL_DELETE_BUTTON_LABEL']}', RES_NEXT_LABEL='{$app_strings['LNK_LIST_NEXT']}', RES_PREVIOUS_LABEL='{$app_strings['LNK_LIST_PREVIOUS']}',
 RES_ASC='{$SS_mod_strings["LBL_ASCENDING"]}',RES_DESC='{$SS_mod_strings["LBL_DESCENDING"]}',RES_HOME_LABEL='{$all_app_list_strings["moduleList"]["Home"]}',RES_SYNC='{$all_app_list_strings["moduleList"]["Sync"]}',RES_SAVEDSEARCH='{$all_app_list_strings["moduleList"]["SavedSearch"]}',RES_SAVESEARCH='{$SS_mod_strings["LBL_SAVE_SEARCH_AS"]}',RES_DISABLED='{$ADM_mod_strings["LBL_DISABLED"]}',
 sugar_app_list_strings = {$app_list_strings_encoded};
EOQ;
        $SS_mod_strings = null;
        $ADM_mod_strings = null;
        $all_app_list_strings = null;
        $app_array = array('LBL_CREATE_BUTTON_LABEL', 'LBL_EDIT_BUTTON', 'LBL_LIST', 'LBL_SEARCH_BUTTON_LABEL', 'LBL_CURRENT_USER_FILTER', 'LBL_BACK', 'LBL_SAVE_BUTTON_LABEL', 'LBL_CANCEL_BUTTON_LABEL', 'LBL_MARK_AS_FAVORITES', 'LBL_REMOVE_FROM_FAVORITES', 'NTC_DELETE_CONFIRMATION', 'LBL_DELETE_BUTTON_LABEL', 'ERROR_NO_RECORD', 'LBL_LAST_VIEWED', 'LNK_LIST_NEXT', 'LNK_LIST_PREVIOUS', 'LBL_LINK_SELECT', 'LBL_LIST_USER_NAME', 'NTC_LOGIN_MESSAGE', 'ERR_INVALID_EMAIL_ADDRESS', 'LBL_ASSIGNED_TO', 'LBL_CLEAR_BUTTON_LABEL', 'LBL_DURATION_DAYS', 'LBL_CLOSE_AND_CREATE_BUTTON_TITLE', 'LBL_CLOSE_AND_CREATE_BUTTON_LABEL', 'LBL_CLOSE_BUTTON_TITLE', 'LBL_CLOSE_BUTTON_LABEL', 'LBL_LISTVIEW_ALL', 'LBL_LISTVIEW_NONE', 'LBL_SAVED', 'LBL_PRIMARY_ADDRESS', 'LBL_BILLING_ADDRESS', 'LBL_ALT_ADDRESS', 'LBL_SHIPPING_ADDRESS', 'LBL_DUPLICATE_BUTTON', 'MSG_SHOW_DUPLICATES', 'LBL_EMAIL_OPT_OUT', 'MSG_LIST_VIEW_NO_RESULTS_BASIC', 'LBL_CITY');
        $str_app_array = array();
        foreach ($app_array as $key) {
            $str_app_array[$key] = str_replace('"', '\\"', isset($app_strings[$key]) ? $app_strings[$key] : $key);
        }
        $app_strings_encoded = $json->encode($str_app_array);
        $str .= "var sugar_app_strings = {$app_strings_encoded};";
        require_once 'modules/Administration/Administration.php';
        $administration = new Administration();
        $administration->saveSetting('QuickCRM', $lang, base64_encode($str));
        $in_file = strlen($str) > 49000 ? '1' : '0';
        $administration->saveSetting('QuickCRM', $lang . 'f', $in_file);
        //		if ($sugar_config['sugar_version']<'6.3'){
        $saveDir = realpath(dirname(__FILE__) . '/../../../mobile/fielddefs/');
        if ($fh = @fopen($saveDir . '/' . $lang . '.js', "w")) {
            fputs($fh, $str);
            fclose($fh);
        } else {
            // die();
        }
        //		}
    }
예제 #6
0
 public function setUp()
 {
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #7
0
 /**
  * Workflow: Check module builder modules for "moduleList" and "moduleListSingular"
  * labels and translations. Create or append fixed content to package
  * language file to make it compatible with Studio or ModuleBuilder for future changes
  */
 public function run()
 {
     if (empty($this->upgrader->state['MBModules'])) {
         // No MB modules - nothing to do
         return;
     }
     $app_list_strings = return_app_list_strings_language("en_us");
     $changes = array();
     $packages = $this->getPackages();
     foreach ($this->upgrader->state['MBModules'] as $MBModule) {
         // All custom modules will have package key in module name
         $keys = explode('_', $MBModule);
         $packageKey = $keys[0];
         if (!isset($packages[$packageKey])) {
             $this->upgrader->log('FixSingularList: can\'t find package for module: key - ' . $packageKey . '. Script will use current key as package name');
             $packages[$packageKey] = $packageKey;
         }
         $changes[$packageKey] = isset($changes[$packageKey]) ? $changes[$packageKey] : array();
         // Try to add custom module to moduleList
         if (!isset($app_list_strings['moduleList'][$MBModule])) {
             $langFile = $this->getLanguageFilePath($MBModule);
             if (file_exists($langFile)) {
                 $mod_strings = array();
                 require $langFile;
                 $moduleName = isset($mod_strings['LBL_MODULE_NAME']) ? $mod_strings['LBL_MODULE_NAME'] : false;
                 if ($moduleName) {
                     $app_list_strings['moduleList'][$MBModule] = $moduleName;
                     $changes[$packageKey]['moduleList'][$MBModule] = $moduleName;
                 } else {
                     $this->upgrader->log('FixSingularList: warning - module ' . $MBModule . ' do not have module name translation');
                 }
             }
         }
         if (!isset($app_list_strings['moduleListSingular'][$MBModule]) && !empty($app_list_strings['moduleList'][$MBModule])) {
             $changes[$packageKey]['moduleListSingular'][$MBModule] = $app_list_strings['moduleList'][$MBModule];
         }
     }
     $rebuildLang = false;
     foreach ($changes as $packageKey => $content) {
         // if no changes - continue
         if (empty($content)) {
             continue;
         }
         $packageName = $packages[$packageKey];
         $fileName = $this->getPackageLangFile($packageName);
         $values = $this->mergeCustomTranslations($fileName, $content);
         $header = file_get_contents('modules/ModuleBuilder/MB/header.php');
         $file = $header;
         foreach ($values as $key => $array) {
             $file .= override_value_to_string_recursive2('app_list_strings', $key, $array);
         }
         $this->upgrader->putFile($fileName, $file);
         $rebuildLang = true;
     }
     if ($rebuildLang) {
         $mi = new ModuleInstaller();
         $mi->silent = true;
         $mi->rebuild_languages(array('en_us' => 'en_us'));
     }
 }
예제 #8
0
 public function run()
 {
     if (!version_compare($this->from_version, '7.0', '<')) {
         // only need to run this upgrading from pre 7.0 versions
         return;
     }
     // get singular module names
     $my_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
     $moduleSingular = $my_list_strings['moduleListSingular'];
     // get custom modules
     $customModules = array();
     $customFiles = glob('modules' . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . '*_sugar.php', GLOB_NOSORT);
     // file header
     $header = file_get_contents('modules/ModuleBuilder/MB/header.php');
     // iterate custom modules
     foreach ($customFiles as $customFile) {
         $moduleName = str_replace('_sugar', '', pathinfo($customFile, PATHINFO_FILENAME));
         $modulePath = pathinfo($customFile, PATHINFO_DIRNAME) . DIRECTORY_SEPARATOR . 'language';
         $langFiles = glob($modulePath . DIRECTORY_SEPARATOR . '*.lang.php', GLOB_NOSORT);
         // iterate language file
         foreach ($langFiles as $langFile) {
             // add LBL_MODULE_NAME_SINGULAR if not already there
             unset($mod_strings);
             include $langFile;
             if (isset($mod_strings) && !isset($mod_strings['LBL_MODULE_NAME_SINGULAR']) && isset($moduleSingular[$moduleName])) {
                 $mod_strings['LBL_MODULE_NAME_SINGULAR'] = $moduleSingular[$moduleName];
                 write_array_to_file('mod_strings', $mod_strings, $langFile, 'w', $header);
             }
         }
     }
 }
예제 #9
0
 /**
  * Creates lead records
  * @param $apiServiceBase The API class of the request, used in cases where the API changes how the fields are pulled from the args array.
  * @param $args array The arguments array passed in from the API
  * @return array properties on lead bean formatted for display
  */
 public function createLeadRecord($api, $args)
 {
     // Bug 54647 Lead registration can create empty leads
     if (!isset($args['last_name'])) {
         throw new SugarApiExceptionMissingParameter();
     }
     /**
      *
      * Bug56194: This API can be hit without logging into Sugar, but the creation of a Lead SugarBean
      * uses messages that require the use of the app strings.
      *
      **/
     global $app_list_strings;
     global $current_language;
     if (!isset($app_list_strings)) {
         $app_list_strings = return_app_list_strings_language($current_language);
     }
     $bean = BeanFactory::newBean('Leads');
     // we force team and teamset because there is no current user to get them from
     $fields = array('team_set_id' => '1', 'team_id' => '1', 'lead_source' => 'Support Portal User Registration');
     $admin = Administration::getSettings();
     if (isset($admin->settings['portal_defaultUser']) && !empty($admin->settings['portal_defaultUser'])) {
         $fields['assigned_user_id'] = json_decode(html_entity_decode($admin->settings['portal_defaultUser']));
     }
     $fieldList = array('first_name', 'last_name', 'phone_work', 'email', 'primary_address_country', 'primary_address_state', 'account_name', 'title', 'preferred_language');
     foreach ($fieldList as $fieldName) {
         if (isset($args[$fieldName])) {
             $fields[$fieldName] = $args[$fieldName];
         }
     }
     $id = $this->updateBean($bean, $api, $fields);
     return $id;
 }
 /**
  * Takes in the request params from a save request and processes 
  * them for the save.
  *
  * @param REQUEST params  $params
  */
 function saveDropDown($params)
 {
     $count = 0;
     $dropdown = array();
     $dropdown_name = $params['dropdown_name'];
     $selected_lang = !empty($params['dropdown_lang']) ? $params['dropdown_lang'] : $_SESSION['authenticated_user_language'];
     $my_list_strings = return_app_list_strings_language($selected_lang);
     while (isset($params['slot_' . $count])) {
         $index = $params['slot_' . $count];
         $key = isset($params['key_' . $index]) ? $params['key_' . $index] : 'BLANK';
         $value = isset($params['value_' . $index]) ? $params['value_' . $index] : '';
         if ($key == 'BLANK') {
             $key = '';
         }
         $key = trim($key);
         $value = trim($value);
         if (empty($params['delete_' . $index])) {
             $dropdown[$key] = $value;
         }
         $count++;
     }
     if ($selected_lang == $GLOBALS['current_language']) {
         $GLOBALS['app_list_strings'][$dropdown_name] = $dropdown;
     }
     $contents = return_custom_app_list_strings_file_contents($selected_lang);
     $new_contents = replace_or_add_dropdown_type($dropdown_name, $dropdown, $contents);
     save_custom_app_list_strings_contents($new_contents, $selected_lang);
     sugar_cache_reset();
 }
예제 #11
0
 public function setUp()
 {
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     //Reload langauge strings
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
     //Create an anonymous user for login purposes/
     $this->_user = SugarTestUserUtilities::createAnonymousUser();
     $this->_admin_user = SugarTestUserUtilities::createAnonymousUser();
     $this->_admin_user->status = 'Active';
     $this->_admin_user->is_admin = 1;
     $this->_admin_user->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
     $GLOBALS['current_user'] = $this->_user;
     self::$helperObject = new APIv3Helper();
     //Disable access to the website field.
     $this->aclRole = new ACLRole();
     $this->aclRole->name = "Unit Test";
     $this->aclRole->save();
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
     $this->aclRole->set_relationship('acl_roles_users', array('role_id' => $this->aclRole->id, 'user_id' => $this->_user->id), false);
     $GLOBALS['db']->commit();
     // Making sure we commit any changes before continuing
 }
예제 #12
0
 /**
  * Test the getMime function for the use case where the mime type is already provided.
  *
  * @dataProvider _moduleNameProvider2
  */
 public function testGetModuleFromRenamed($renamed, $expectedName)
 {
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     // manually rename the module name to 'Acct'
     $GLOBALS['app_list_strings']['moduleList']['Accounts'] = 'Acct';
     $module = get_module_from_singular($renamed);
     $this->assertEquals($expectedName, $module);
 }
예제 #13
0
 /**
  * Create test user
  *
  */
 public function setUp()
 {
     $this->_soapURL = $GLOBALS['sugar_config']['site_url'] . '/service/v3/soap.php';
     parent::setUp();
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     self::$helperObject = new APIv3Helper();
 }
예제 #14
0
 function setUp()
 {
     $this->fields = array('name' => array('width' => '40%', 'label' => 'LBL_LIST_ACCOUNT_NAME', 'link' => 1, 'default' => 1, 'name' => 'name'));
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #15
0
 public function testWillLoadEnUsStringIfDefaultLanguageIsNotEnUs()
 {
     file_put_contents('include/language/fr_test.lang.php', '<?php $app_list_strings = array(); ?>');
     file_put_contents('include/language/de_test.lang.php', '<?php $app_list_strings = array(); ?>');
     $sugar_config['default_language'] = 'fr_test';
     $strings = return_app_list_strings_language('de_test');
     $this->assertArrayHasKey('lead_source_default_key', $strings);
 }
예제 #16
0
 public function setUp()
 {
     global $current_user;
     $this->beans = array();
     $this->old_user = $current_user;
     $current_user = $this->_user = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
 }
예제 #17
0
 public function setUp()
 {
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     require_once 'modules/ModuleBuilder/parsers/ParserFactory.php';
     $this->_parser = ParserFactory::getParser('EditView', 'Accounts');
 }
예제 #18
0
 public function setUp()
 {
     global $beanList, $beanFiles;
     require 'include/modules.php';
     $_REQUEST = array();
     $_REQUEST['view'] = 'dashlet';
     $_REQUEST['view_module'] = 'Meetings';
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #19
0
 /**
  * Initialize globals
  */
 protected function initGlobals()
 {
     global $current_language, $app_list_strings, $app_strings, $sugar_config;
     if (empty($current_language)) {
         $current_language = $sugar_config['default_language'];
     }
     $app_list_strings = return_app_list_strings_language($current_language);
     $app_strings = return_application_language($current_language);
 }
 /**
  * Return value of a field from layout_def
  * @param mixed $layout_def
  * @return string
  */
 function _get_list_value(&$layout_def)
 {
     $value = parent::_get_list_value($layout_def);
     if (!empty($value) && isset($this->reporter->all_fields[$layout_def['column_key']]['options'])) {
         $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
         $value = $app_list_strings[$this->reporter->all_fields[$layout_def['column_key']]['options']][$value];
     }
     return $value;
 }
예제 #21
0
 public static function setUpBeforeClass()
 {
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #22
0
 public function setUp()
 {
     $this->current_user = new User();
     $this->focus = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_list_strings'] = return_application_language($GLOBALS['current_language']);
     global $sugar_config;
     $sugar_config['default_user_name'] = $this->focus->user_name;
     global $app_list_strings;
     $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #23
0
 public function setUp()
 {
     $this->markTestSkipped('skipping');
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #24
0
 public function setUp()
 {
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     //Reload langauge strings
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Accounts');
 }
예제 #25
0
 public function setUp()
 {
     global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
     $mod_strings = return_module_language($GLOBALS['current_language'], "Configurator");
     $current_user = SugarTestUserUtilities::createAnonymousUser();
     $app_strings = return_application_language($GLOBALS['current_language']);
     $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
     $sugar_config = $GLOBALS['sugar_config'];
     $locale = new Localization();
 }
예제 #26
0
 public function setUp()
 {
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->task = SugarTestTaskUtilities::createTask();
     $this->task->contact_id = $this->contact->id;
     $this->task->save();
 }
예제 #27
0
 public function setUp()
 {
     $this->markTestIncomplete('This test will fail when the entire suite is run.  Probably needs mock objects for the list view objects');
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, 1);
     $GLOBALS['app_strings'] = return_application_language($GLOBALS['current_language']);
     $GLOBALS['mod_strings'] = return_module_language($GLOBALS['current_language'], 'Users');
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['action'] = 'index';
     $GLOBALS['module'] = 'Users';
     $_REQUEST['module'] = 'Users';
 }
 public function setUp()
 {
     $this->markTestSkipped('skipping');
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
 }
예제 #29
0
 public function setUp()
 {
     global $app_strings, $app_list_strings;
     $app_strings = return_application_language($GLOBALS['current_language']);
     $app_list_strings = return_app_list_strings_language($GLOBALS['current_language']);
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser();
     $this->contact = SugarTestContactUtilities::createContact();
     $this->account = SugarTestAccountUtilities::createAccount();
     $override_data = array('parent_type' => 'Accounts', 'parent_id' => $this->account->id);
     $this->email = SugarTestEmailUtilities::createEmail('', $override_data);
 }
예제 #30
0
 public function setUp()
 {
     $this->markTestIncomplete("This test breaks others tests on 644 on CI.  Disabling for sanity check");
     $GLOBALS['app_list_strings'] = return_app_list_strings_language($GLOBALS['current_language']);
     $beanList = array();
     $beanFiles = array();
     require 'include/modules.php';
     $GLOBALS['beanList'] = $beanList;
     $GLOBALS['beanFiles'] = $beanFiles;
     $GLOBALS['current_user'] = SugarTestUserUtilities::createAnonymousUser(true, 1);
 }