2 /*********************************************************************************
3 * SugarCRM Community Edition is a customer relationship management program developed by
4 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
6 * This program is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Affero General Public License version 3 as published by the
8 * Free Software Foundation with the addition of the following permission added
9 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
11 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
18 * You should have received a copy of the GNU Affero General Public License along with
19 * this program; if not, see http://www.gnu.org/licenses or write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
24 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
26 * The interactive user interfaces in modified source and object code versions
27 * of this program must display Appropriate Legal Notices, as required under
28 * Section 5 of the GNU Affero General Public License version 3.
30 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31 * these Appropriate Legal Notices must retain the display of the "Powered by
32 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
33 * technical reasons, the Appropriate Legal Notices must display the words
34 * "Powered by SugarCRM".
35 ********************************************************************************/
38 class Bug30709_Part_2_Test extends Sugar_PHPUnit_Framework_TestCase
40 protected function setUp()
42 sugar_mkdir('custom/include/language', 0777, true);
46 \$GLOBALS['app_list_strings'] = array (
55 'Cold Call' => 'Cold Call',
56 'Existing Customer' => 'Existing Customer',
57 'Self Generated' => 'Self Generated',
58 'Employee' => 'Employee',
59 'Partner' => 'Partner',
60 'Public Relations' => 'Public Relations',
61 'Direct Mail' => 'Direct Mail',
62 'Conference' => 'Conference',
63 'Trade Show' => 'Trade Show',
64 'Web Site' => 'Web Site',
65 'Word of mouth' => 'Word of mouth',
67 'Campaign'=>'Campaign',
70 'opportunity_type_dom' =>
73 'Existing Business' => 'Existing Business',
74 'New Business' => 'New Business',
79 'Dashboard' => 'Dashboard',
80 'Contacts' => 'Contacts',
81 'Accounts' => 'Accounts Module',
82 'Opportunities' => 'Opportunities',
87 'Meetings' => 'Meetings',
89 'Calendar' => 'Calendar',
91 'Currencies' => 'Currencies',
92 'Contracts' => 'Contracts',
94 'Products' => 'Products',
95 'ProductCategories' => 'Product Categories',
96 'ProductTypes' => 'Product Types',
97 'ProductTemplates' => 'Product Catalog',
98 'Reports' => 'Reports',
99 'Reports_1' => 'Reports',
100 'Forecasts' => 'Forecasts',
101 'ForecastSchedule' => 'Forecast Schedule',
102 'MergeRecords' => 'Merge Records',
103 'Quotas' => 'Quotas',
105 'Activities' => 'Activities',
108 'iFrames' => 'My Portal',
109 'TimePeriods' => 'Time Periods',
110 'Project' => 'Projects',
111 'ProjectTask' => 'Project Tasks',
112 'Campaigns' => 'Campaigns',
113 'CampaignLog' => 'Campaign Log',
114 'Documents' => 'Documents',
116 'WorkFlow' => 'Work Flow',
118 'Releases' => 'Releases',
119 'Prospects' => 'Targets',
120 'Queues' => 'Queues',
121 'EmailMarketing' => 'Email Marketing',
122 'EmailTemplates' => 'Email Templates',
123 'ProspectLists' => 'Target Lists',
124 'SavedSearch' => 'Saved Searches',
125 'Trackers' => 'Trackers',
126 'TrackerPerfs' => 'Tracker Performance',
127 'TrackerSessions' => 'Tracker Sessions',
128 'TrackerQueries' => 'Tracker Queries',
130 'Newsletters' => 'Newsletters',
131 'SugarFeed' => 'Sugar Feed',
132 'Library' => 'Library',
133 'EmailAddresses' => 'Email Address',
134 'KBDocuments' => 'Knowledge Base',
135 'my_personal_module' => 'My Personal Module',
139 \$GLOBALS['app_strings']['LBL_TEST'] = 'This is a test';
142 file_put_contents('custom/include/language/en_us.lang.php', $string);
145 protected function tearDown()
147 unlink('custom/include/language/en_us.lang.php');
150 public function testDropdownFixed()
152 require_once('modules/UpgradeWizard/uw_utils.php');
155 unset($GLOBALS['app_list_strings']);
156 require('custom/include/language/en_us.lang.php');
157 $this->assertEquals(count($GLOBALS['app_list_strings']), 2);
158 $this->assertArrayHasKey('my_personal_module', $GLOBALS['app_list_strings']['moduleList']);
159 $this->assertEquals($GLOBALS['app_list_strings']['moduleList']['Accounts'], 'Accounts Module');
160 $this->assertEquals(count($GLOBALS['app_strings']), 1);
161 $this->assertEquals($GLOBALS['app_strings']['LBL_TEST'], 'This is a test');