Completed
Push — CI ( ee6bd7...0f01dd )
by Adam
22:32
created
tests/tests/modules/Opportunities/OpportunityTest.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
 		//execute the contructor and check for the Object type and  attributes
10 10
 		$opportunity = new Opportunity();
11 11
 			
12
-		$this->assertInstanceOf('Opportunity',$opportunity);
13
-		$this->assertInstanceOf('SugarBean',$opportunity);
12
+		$this->assertInstanceOf('Opportunity', $opportunity);
13
+		$this->assertInstanceOf('SugarBean', $opportunity);
14 14
 		
15 15
 
16 16
 		$this->assertAttributeEquals('opportunities', 'table_name', $opportunity);
@@ -25,57 +25,57 @@  discard block
 block discarded – undo
25 25
 	}
26 26
 
27 27
 
28
-	public function testget_summary_text()	{
28
+	public function testget_summary_text() {
29 29
 
30 30
 		error_reporting(E_ERROR | E_PARSE);
31 31
 		
32 32
 		$opportunity = new Opportunity();
33 33
 		
34 34
 		//test without setting name
35
-		$this->assertEquals(Null,$opportunity->get_summary_text());
35
+		$this->assertEquals(Null, $opportunity->get_summary_text());
36 36
 		
37 37
 		//test with name set
38 38
 		$opportunity->name = "test";
39
-		$this->assertEquals('test',$opportunity->get_summary_text());
39
+		$this->assertEquals('test', $opportunity->get_summary_text());
40 40
 		
41 41
 	}
42 42
 
43
-	public function testcreate_list_query(){
43
+	public function testcreate_list_query() {
44 44
 
45 45
 		$opportunity = new Opportunity();
46 46
 		
47 47
 		//test with empty string params
48 48
 		$expected = "SELECT \n                            accounts.id as account_id,\n                            accounts.name as account_name,\n                            accounts.assigned_user_id account_id_owner,\n                            users.user_name as assigned_user_name  ,opportunities.*\n                            FROM opportunities LEFT JOIN users\n                            ON opportunities.assigned_user_id=users.id LEFT JOIN accounts_opportunities\n                            ON opportunities.id=accounts_opportunities.opportunity_id\n                            LEFT JOIN accounts\n                            ON accounts_opportunities.account_id=accounts.id where \n			(accounts_opportunities.deleted is null OR accounts_opportunities.deleted=0)\n			AND (accounts.deleted is null OR accounts.deleted=0)\n			AND opportunities.deleted=0 ORDER BY opportunities.name";
49
-		$actual = $opportunity->create_list_query('','');
50
-		$this->assertSame($expected,$actual);
49
+		$actual = $opportunity->create_list_query('', '');
50
+		$this->assertSame($expected, $actual);
51 51
 		
52 52
 			
53 53
 		//test with valid string params
54 54
 		$expected = "SELECT \n                            accounts.id as account_id,\n                            accounts.name as account_name,\n                            accounts.assigned_user_id account_id_owner,\n                            users.user_name as assigned_user_name  ,opportunities.*\n                            FROM opportunities LEFT JOIN users\n                            ON opportunities.assigned_user_id=users.id LEFT JOIN accounts_opportunities\n                            ON opportunities.id=accounts_opportunities.opportunity_id\n                            LEFT JOIN accounts\n                            ON accounts_opportunities.account_id=accounts.id where (accounts.name=\"\") AND \n			(accounts_opportunities.deleted is null OR accounts_opportunities.deleted=0)\n			AND (accounts.deleted is null OR accounts.deleted=0)\n			AND opportunities.deleted=0 ORDER BY accounts.id";
55
-		$actual = $opportunity->create_list_query('accounts.id','accounts.name=""');
56
-		$this->assertSame($expected,$actual);
55
+		$actual = $opportunity->create_list_query('accounts.id', 'accounts.name=""');
56
+		$this->assertSame($expected, $actual);
57 57
 			
58 58
 	}
59 59
 	
60 60
 
61
-    public function testcreate_export_query(){
61
+    public function testcreate_export_query() {
62 62
 
63 63
     	$opportunity = new Opportunity();
64 64
     	
65 65
     	//test with empty string params
66 66
     	$expected = "SELECT \n                            accounts.id as account_id,\n                            accounts.name as account_name,\n                            accounts.assigned_user_id account_id_owner,\n                            users.user_name as assigned_user_name  ,opportunities.*\n                            FROM opportunities LEFT JOIN users\n                            ON opportunities.assigned_user_id=users.id LEFT JOIN accounts_opportunities\n                            ON opportunities.id=accounts_opportunities.opportunity_id\n                            LEFT JOIN accounts\n                            ON accounts_opportunities.account_id=accounts.id where \n			(accounts_opportunities.deleted is null OR accounts_opportunities.deleted=0)\n			AND (accounts.deleted is null OR accounts.deleted=0)\n			AND opportunities.deleted=0 ORDER BY opportunities.name";
67
-    	$actual = $opportunity->create_list_query('','');
68
-    	$this->assertSame($expected,$actual);
67
+    	$actual = $opportunity->create_list_query('', '');
68
+    	$this->assertSame($expected, $actual);
69 69
 
70 70
     	
71 71
     	//test with valid string params
72 72
     	$expected = "SELECT \n                            accounts.id as account_id,\n                            accounts.name as account_name,\n                            accounts.assigned_user_id account_id_owner,\n                            users.user_name as assigned_user_name  ,opportunities.*\n                            FROM opportunities LEFT JOIN users\n                            ON opportunities.assigned_user_id=users.id LEFT JOIN accounts_opportunities\n                            ON opportunities.id=accounts_opportunities.opportunity_id\n                            LEFT JOIN accounts\n                            ON accounts_opportunities.account_id=accounts.id where (accounts.name=\"\") AND \n			(accounts_opportunities.deleted is null OR accounts_opportunities.deleted=0)\n			AND (accounts.deleted is null OR accounts.deleted=0)\n			AND opportunities.deleted=0 ORDER BY accounts.id";
73
-    	$actual = $opportunity->create_list_query('accounts.id','accounts.name=""');
74
-    	$this->assertSame($expected,$actual);
73
+    	$actual = $opportunity->create_list_query('accounts.id', 'accounts.name=""');
74
+    	$this->assertSame($expected, $actual);
75 75
     	
76 76
     }
77 77
 
78
-	public function testfill_in_additional_list_fields(){
78
+	public function testfill_in_additional_list_fields() {
79 79
 
80 80
 		$opportunity = new Opportunity();
81 81
 		
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		
99 99
 	}
100 100
 
101
-	public function testfill_in_additional_detail_fields(){
101
+	public function testfill_in_additional_detail_fields() {
102 102
 
103 103
 		$opportunity = new Opportunity();
104 104
 		
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	}
116 116
 
117 117
 
118
-	public function testget_contacts(){
118
+	public function testget_contacts() {
119 119
 
120 120
 		$opportunity = new Opportunity();
121 121
 		
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
 		
125 125
 	}
126 126
 
127
-	public function testupdate_currency_id(){
127
+	public function testupdate_currency_id() {
128 128
 
129 129
 		$opportunity = new Opportunity();
130 130
 
131 131
 		//execute the method and test if it works and does not throws an exception.
132 132
 		try {
133 133
 		
134
-			$opportunity->update_currency_id(array('GBP','EUR'), 'USD');
134
+			$opportunity->update_currency_id(array('GBP', 'EUR'), 'USD');
135 135
 			$this->assertTrue(true);
136 136
 		}
137 137
 		catch (Exception $e) {
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
 		
142 142
 	}
143 143
 
144
-	public function testget_list_view_data(){
144
+	public function testget_list_view_data() {
145 145
 
146 146
 		$opportunity = new Opportunity();
147 147
 		
148
-		$opportunity->name  = "test";
148
+		$opportunity->name = "test";
149 149
 				
150
-		$expected = array (
150
+		$expected = array(
151 151
 				'NAME' => 'test',
152 152
 				'DELETED' => 0,
153 153
 				'SALES_STAGE' => '',
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 		
165 165
 	}
166 166
 
167
-    public function testget_currency_symbol(){
167
+    public function testget_currency_symbol() {
168 168
 
169 169
     	$opportunity = new Opportunity();
170 170
     	
@@ -179,23 +179,23 @@  discard block
 block discarded – undo
179 179
     }
180 180
 
181 181
 
182
-	public function testbuild_generic_where_clause () {
182
+	public function testbuild_generic_where_clause() {
183 183
 
184 184
 		$opportunity = new Opportunity();
185 185
 
186 186
 		//test with empty string params
187 187
 		$expected = "opportunities.name like '%' or accounts.name like '%'";
188 188
 		$actual = $opportunity->build_generic_where_clause('');
189
-		$this->assertSame($expected,$actual);
189
+		$this->assertSame($expected, $actual);
190 190
 		
191 191
 	}
192 192
 
193
-	public function testsave(){
193
+	public function testsave() {
194 194
  
195 195
 		$opportunity = new Opportunity();
196 196
 		
197 197
 		$opportunity->name = "test";
198
-		$opportunity->description ="test description";
198
+		$opportunity->description = "test description";
199 199
 		$opportunity->sales_stage = "Value Proposition";
200 200
 		
201 201
 		$result = $opportunity->save();
@@ -210,11 +210,11 @@  discard block
 block discarded – undo
210 210
 		//mark the record as deleted and verify that this record cannot be retrieved anymore.
211 211
 		$opportunity->mark_deleted($opportunity->id);
212 212
 		$result = $opportunity->retrieve($opportunity->id);
213
-		$this->assertEquals(null,$result);
213
+		$this->assertEquals(null, $result);
214 214
 		
215 215
 	}
216 216
 
217
-	public function testsave_relationship_changes(){
217
+	public function testsave_relationship_changes() {
218 218
 
219 219
 		$opportunity = new Opportunity();
220 220
 		$opportunity->account_id = 1;
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		
230 230
 	}
231 231
 
232
-	public function testset_opportunity_contact_relationship(){
232
+	public function testset_opportunity_contact_relationship() {
233 233
 
234 234
 		$opportunity = new Opportunity();
235 235
 		
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 		
244 244
 	}
245 245
 
246
-	public function testset_notification_body(){
246
+	public function testset_notification_body() {
247 247
 
248 248
 
249 249
 		$opportunity = new Opportunity();
@@ -251,21 +251,21 @@  discard block
 block discarded – undo
251 251
 		//test with attributes preset and verify template variables are set accordingly
252 252
 		
253 253
 		$opportunity->name = "test";
254
-		$opportunity->amount ="100";
254
+		$opportunity->amount = "100";
255 255
 		$opportunity->date_closed = "2015-02-11 17:30:00";
256 256
 		$opportunity->description = "tes description";
257 257
 		$opportunity->sales_stage = "Value Proposition";
258 258
 		
259 259
 		$result = $opportunity->set_notification_body(new Sugar_Smarty(), $opportunity);
260 260
 		
261
-		$this->assertEquals($opportunity->name ,$result->_tpl_vars['OPPORTUNITY_NAME']);
262
-		$this->assertEquals($opportunity->amount  ,$result->_tpl_vars['OPPORTUNITY_AMOUNT']);
263
-		$this->assertEquals($opportunity->date_closed ,$result->_tpl_vars['OPPORTUNITY_CLOSEDATE']);
264
-		$this->assertEquals($opportunity->sales_stage ,$result->_tpl_vars['OPPORTUNITY_STAGE']);
265
-		$this->assertEquals($opportunity->description ,$result->_tpl_vars['OPPORTUNITY_DESCRIPTION']);
261
+		$this->assertEquals($opportunity->name, $result->_tpl_vars['OPPORTUNITY_NAME']);
262
+		$this->assertEquals($opportunity->amount, $result->_tpl_vars['OPPORTUNITY_AMOUNT']);
263
+		$this->assertEquals($opportunity->date_closed, $result->_tpl_vars['OPPORTUNITY_CLOSEDATE']);
264
+		$this->assertEquals($opportunity->sales_stage, $result->_tpl_vars['OPPORTUNITY_STAGE']);
265
+		$this->assertEquals($opportunity->description, $result->_tpl_vars['OPPORTUNITY_DESCRIPTION']);
266 266
 	}
267 267
 
268
-	public function testbean_implements(){
268
+	public function testbean_implements() {
269 269
 
270 270
 		$opportunity = new Opportunity();
271 271
 		
@@ -275,13 +275,13 @@  discard block
 block discarded – undo
275 275
 		
276 276
 	}
277 277
 
278
-	public function testlistviewACLHelper(){
278
+	public function testlistviewACLHelper() {
279 279
 
280 280
 		$opportunity = new Opportunity();
281 281
 		
282
-		$expected = array("MAIN"=>"a", "ACCOUNT"=>"a" );
282
+		$expected = array("MAIN"=>"a", "ACCOUNT"=>"a");
283 283
 		$actual = $opportunity->listviewACLHelper();
284
-		$this->assertSame($expected,$actual);
284
+		$this->assertSame($expected, $actual);
285 285
 		
286 286
 	}
287 287
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 		
296 296
 	}
297 297
 	
298
-	public function testgetCurrencyType(){
298
+	public function testgetCurrencyType() {
299 299
 	
300 300
 		//execute the method and test if it works and does not throws an exception.
301 301
 		try {
Please login to merge, or discard this patch.
tests/tests/modules/CampaignTrackers/CampaignTrackerTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-class CampaignTrackerTest extends PHPUnit_Framework_TestCase  {
4
+class CampaignTrackerTest extends PHPUnit_Framework_TestCase {
5 5
 
6 6
 
7 7
     public function testCampaignTracker() 
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
     	
11 11
     	//execute the contructor and check for the Object type and  attributes
12 12
     	$campaignTracker = new CampaignTracker();
13
-    	$this->assertInstanceOf('CampaignTracker',$campaignTracker);
14
-    	$this->assertInstanceOf('SugarBean',$campaignTracker);
13
+    	$this->assertInstanceOf('CampaignTracker', $campaignTracker);
14
+    	$this->assertInstanceOf('SugarBean', $campaignTracker);
15 15
     	
16 16
     	$this->assertAttributeEquals('CampaignTrackers', 'module_dir', $campaignTracker);
17 17
     	$this->assertAttributeEquals('CampaignTracker', 'object_name', $campaignTracker);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     	//mark the record as deleted and verify that this record cannot be retrieved anymore.
39 39
     	$campaignTracker->mark_deleted($campaignTracker->id);
40 40
     	$result = $campaignTracker->retrieve($campaignTracker->id);
41
-    	$this->assertEquals(null,$result);
41
+    	$this->assertEquals(null, $result);
42 42
     	
43 43
     }
44 44
 
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
     	$campaignTracker = new CampaignTracker();
50 50
     	
51 51
     	//test without setting name
52
-    	$this->assertEquals(Null,$campaignTracker->get_summary_text());
52
+    	$this->assertEquals(Null, $campaignTracker->get_summary_text());
53 53
 
54 54
     	//test with name set
55 55
     	$campaignTracker->tracker_name = "test";
56
-    	$this->assertEquals('test',$campaignTracker->get_summary_text());
56
+    	$this->assertEquals('test', $campaignTracker->get_summary_text());
57 57
     	 
58 58
     }
59 59
 
Please login to merge, or discard this patch.
tests/tests/modules/SavedSearch/SavedSearchTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 		//execute the contructor and check for the Object type and  attributes
9 9
 		$savedSearch = new SavedSearch();
10 10
 		
11
-		$this->assertInstanceOf('SavedSearch',$savedSearch);
12
-		$this->assertInstanceOf('SugarBean',$savedSearch);
11
+		$this->assertInstanceOf('SavedSearch', $savedSearch);
12
+		$this->assertInstanceOf('SugarBean', $savedSearch);
13 13
 			
14 14
 		$this->assertAttributeEquals('saved_search', 'table_name', $savedSearch);
15 15
 		$this->assertAttributeEquals('SavedSearch', 'module_dir', $savedSearch);
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
 		
18 18
 		
19 19
 		//test with parameters
20
-		$savedSearch = new SavedSearch(array('id','name'),'id','ASC');
20
+		$savedSearch = new SavedSearch(array('id', 'name'), 'id', 'ASC');
21 21
 		
22
-		$this->assertAttributeEquals(array('id','name'), 'columns', $savedSearch);
22
+		$this->assertAttributeEquals(array('id', 'name'), 'columns', $savedSearch);
23 23
 		$this->assertAttributeEquals('id', 'orderBy', $savedSearch);
24 24
 		$this->assertAttributeEquals('ASC', 'sortOrder', $savedSearch);
25 25
 		
@@ -30,19 +30,19 @@  discard block
 block discarded – undo
30 30
 
31 31
 		error_reporting(E_ERROR | E_PARSE);
32 32
 		
33
-		$savedSearch = new SavedSearch(array('id','name'),'id','ASC');
33
+		$savedSearch = new SavedSearch(array('id', 'name'), 'id', 'ASC');
34 34
 		$result = $savedSearch->getForm("Leads");
35 35
 		
36
-		$this->assertGreaterThan(0,strlen($result));
36
+		$this->assertGreaterThan(0, strlen($result));
37 37
 		
38 38
 	}
39 39
 
40 40
 	public function testgetSelect() {
41 41
 
42
-		$savedSearch = new SavedSearch(array('id','name'),'id','ASC');
42
+		$savedSearch = new SavedSearch(array('id', 'name'), 'id', 'ASC');
43 43
 		$result = $savedSearch->getSelect("Leads");
44 44
 				
45
-		$this->assertGreaterThan(0,strlen($result));
45
+		$this->assertGreaterThan(0, strlen($result));
46 46
 		
47 47
 	}
48 48
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 		$_REQUEST['description'] = 'test description';
86 86
 		$_REQUEST['test_content'] = 'test text';
87 87
 		
88
-		$expected = array( "search_module"=> "Leads", "description"=>"test description", "test_content"=>"test text", "advanced"=>true);
88
+		$expected = array("search_module"=> "Leads", "description"=>"test description", "test_content"=>"test text", "advanced"=>true);
89 89
 		
90 90
 		//execute the method and then retrieve back to verify contents attribute
91 91
 		$savedSearch->handleSave('', false, false, $id, $searchModuleBean);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		$savedSearch->handleDelete($id);
102 102
 
103 103
 		$result = $savedSearch->retrieve($id);
104
-		$this->assertEquals(null,$result);
104
+		$this->assertEquals(null, $result);
105 105
 		
106 106
 	}
107 107
 	
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 	}
164 164
 
165 165
 
166
-	public function testpopulateRequest(){
166
+	public function testpopulateRequest() {
167 167
 
168 168
 		$savedSearch = new SavedSearch();
169 169
 		
170
-		$savedSearch->contents = array( "search_module"=> "Accounts", 
170
+		$savedSearch->contents = array("search_module"=> "Accounts", 
171 171
 										"description"=>"test text", 
172 172
 										"test_content"=>"some content", 
173 173
 										"advanced"=>true);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
 		//verify thhat Request parameters are set
178 178
 		$this->assertEquals('Accounts', $_REQUEST['search_module']); 
179
-		$this->assertEquals('test text',  $_REQUEST['description']); 
179
+		$this->assertEquals('test text', $_REQUEST['description']); 
180 180
 		$this->assertEquals('some content', $_REQUEST['test_content']); 
181 181
 		
182 182
 		
Please login to merge, or discard this patch.
tests/tests/modules/EmailText/EmailTextTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
 		//execute the contructor and check for the Object type and  attributes
9 9
 		$emailText = new EmailText();
10 10
 	
11
-		$this->assertInstanceOf('EmailText',$emailText);
12
-		$this->assertInstanceOf('SugarBean',$emailText);
11
+		$this->assertInstanceOf('EmailText', $emailText);
12
+		$this->assertInstanceOf('SugarBean', $emailText);
13 13
 			
14 14
 		$this->assertAttributeEquals('EmailText', 'module_dir', $emailText);
15 15
 		$this->assertAttributeEquals('EmailText', 'module_name', $emailText);
Please login to merge, or discard this patch.
tests/tests/modules/AOW_WorkFlow/AOW_WorkFlowTest.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
 class AOW_WorkFlowTest extends PHPUnit_Framework_TestCase {
4 4
 
5 5
 
6
-	public function testAOW_WorkFlow(){
6
+	public function testAOW_WorkFlow() {
7 7
 
8 8
 		//execute the contructor and check for the Object type and  attributes
9 9
 		$aowWorkFlow = new AOW_WorkFlow();
10
-		$this->assertInstanceOf('AOW_WorkFlow',$aowWorkFlow);
11
-		$this->assertInstanceOf('Basic',$aowWorkFlow);
12
-		$this->assertInstanceOf('SugarBean',$aowWorkFlow);
10
+		$this->assertInstanceOf('AOW_WorkFlow', $aowWorkFlow);
11
+		$this->assertInstanceOf('Basic', $aowWorkFlow);
12
+		$this->assertInstanceOf('SugarBean', $aowWorkFlow);
13 13
 
14 14
 		$this->assertAttributeEquals('AOW_WorkFlow', 'module_dir', $aowWorkFlow);
15 15
 		$this->assertAttributeEquals('AOW_WorkFlow', 'object_name', $aowWorkFlow);
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 	}
22 22
 
23
-	public function testbean_implements(){
23
+	public function testbean_implements() {
24 24
 
25 25
 		error_reporting(E_ERROR | E_PARSE);
26 26
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 	}
33 33
 
34
-    public function testsave(){
34
+    public function testsave() {
35 35
 
36 36
     	$aowWorkFlow = new AOW_WorkFlow();
37 37
 
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
     	//mark the record as deleted and verify that this record cannot be retrieved anymore.
49 49
     	$aowWorkFlow->mark_deleted($aowWorkFlow->id);
50 50
     	$result = $aowWorkFlow->retrieve($aowWorkFlow->id);
51
-    	$this->assertEquals(null,$result);
51
+    	$this->assertEquals(null, $result);
52 52
 
53 53
     }
54 54
 
55
-    public function testload_flow_beans(){
55
+    public function testload_flow_beans() {
56 56
 
57 57
     	$aowWorkFlow = new AOW_WorkFlow();
58 58
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
 
71
-	public function testrun_flows(){
71
+	public function testrun_flows() {
72 72
 
73 73
 		$aowWorkFlow = new AOW_WorkFlow();
74 74
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	}
79 79
 
80 80
 
81
-    public function testrun_flow(){
81
+    public function testrun_flow() {
82 82
 
83 83
     	$aowWorkFlow = new AOW_WorkFlow();
84 84
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     }
95 95
 
96 96
 
97
-    public function testrun_bean_flows(){
97
+    public function testrun_bean_flows() {
98 98
 
99 99
     	$aowWorkFlow = new AOW_WorkFlow();
100 100
 
@@ -109,17 +109,17 @@  discard block
 block discarded – undo
109 109
     }
110 110
 
111 111
 
112
-    public function testget_flow_beans(){
112
+    public function testget_flow_beans() {
113 113
 
114 114
     	$aowWorkFlow = new AOW_WorkFlow();
115 115
 
116 116
     	//test for AOS_Quotes. it will return null as no test data is available
117 117
     	$aowWorkFlow->flow_module = "AOS_Quotes";
118 118
     	$result = $aowWorkFlow->get_flow_beans();
119
-    	$this->assertEquals(null,$result);
119
+    	$this->assertEquals(null, $result);
120 120
     }
121 121
 
122
-    public function testbuild_flow_query_join(){
122
+    public function testbuild_flow_query_join() {
123 123
 
124 124
     	$aowWorkFlow = new AOW_WorkFlow();
125 125
     	$query = Array();
@@ -131,56 +131,56 @@  discard block
 block discarded – undo
131 131
 
132 132
 
133 133
 		//test with type custom
134
-    	$expected = Array('join' => array('c' => 'LEFT JOIN calls_cstm c ON calls.id = c.id_c ' ));
134
+    	$expected = Array('join' => array('c' => 'LEFT JOIN calls_cstm c ON calls.id = c.id_c '));
135 135
     	$result = $aowWorkFlow->build_flow_query_join('c', new Call(), 'custom', Array());
136 136
     	$this->assertSame($expected, $result);
137 137
 
138 138
 
139 139
     	//test with type relationship
140
-    	$expected = Array (
141
-    			'join' =>array ("aos_products_quotes" => "LEFT JOIN aos_products_quotes aos_products_quotes ON aos_quotes.id=aos_products_quotes.parent_id AND aos_products_quotes.deleted=0\n\n"),
142
-    			'select' =>array ("aos_products_quotes.id AS 'aos_products_quotes_id'"),
140
+    	$expected = Array(
141
+    			'join' =>array("aos_products_quotes" => "LEFT JOIN aos_products_quotes aos_products_quotes ON aos_quotes.id=aos_products_quotes.parent_id AND aos_products_quotes.deleted=0\n\n"),
142
+    			'select' =>array("aos_products_quotes.id AS 'aos_products_quotes_id'"),
143 143
     	);
144 144
     	$result = $aowWorkFlow->build_flow_query_join('aos_products_quotes', new AOS_Quotes(), 'relationship', Array());
145 145
     	$this->assertSame($expected, $result);
146 146
 
147 147
     }
148 148
 
149
-    public function testbuild_flow_query_where(){
149
+    public function testbuild_flow_query_where() {
150 150
 
151 151
     	$aowWorkFlow = new AOW_WorkFlow();
152 152
 
153 153
     	//test without presetting required object attributes
154 154
     	$expected = Array();
155 155
     	$query = $aowWorkFlow->build_flow_query_where();
156
-		$this->assertSame($expected,$query);
156
+		$this->assertSame($expected, $query);
157 157
 
158 158
 
159 159
 
160 160
 		//test with module required attributes set
161 161
 		$aowWorkFlow->id = '1';
162 162
 		$aowWorkFlow->flow_module = "Calls";
163
-		$expected = array (
164
-				'where' => array ('NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id=\'1\' AND aow_processed.parent_id=calls.id AND aow_processed.status = \'Complete\' AND aow_processed.deleted = 0)',
165
-				'calls.deleted = 0 ' )
163
+		$expected = array(
164
+				'where' => array('NOT EXISTS (SELECT * FROM aow_processed WHERE aow_processed.aow_workflow_id=\'1\' AND aow_processed.parent_id=calls.id AND aow_processed.status = \'Complete\' AND aow_processed.deleted = 0)',
165
+				'calls.deleted = 0 ')
166 166
 				);
167 167
 		$query = $aowWorkFlow->build_flow_query_where();
168
-		$this->assertSame($expected,$query);
168
+		$this->assertSame($expected, $query);
169 169
 
170 170
 
171 171
 
172 172
 		//test with flow_run_on and multiple_runs attributes set
173
-		$expected = array (
174
-						'where' =>	array ('calls.date_entered > \'\'','calls.deleted = 0 '),
173
+		$expected = array(
174
+						'where' =>	array('calls.date_entered > \'\'', 'calls.deleted = 0 '),
175 175
 					);
176 176
 		$aowWorkFlow->flow_run_on = 'New_Records';
177 177
 		$aowWorkFlow->multiple_runs = 1;
178 178
 		$query = $aowWorkFlow->build_flow_query_where();
179
-		$this->assertSame($expected,$query);
179
+		$this->assertSame($expected, $query);
180 180
 
181 181
     }
182 182
 
183
-    public function testbuild_query_where(){
183
+    public function testbuild_query_where() {
184 184
 
185 185
     	$aowWorkFlow = new AOW_WorkFlow();
186 186
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
     }
258 258
 
259
-    public function testcheck_valid_bean(){
259
+    public function testcheck_valid_bean() {
260 260
 
261 261
     	$aowWorkFlow = new AOW_WorkFlow();
262 262
     	$aowWorkFlow->flow_run_on = "New_Records";
@@ -268,28 +268,28 @@  discard block
 block discarded – undo
268 268
 
269 269
     }
270 270
 
271
-    public function testcompare_condition(){
271
+    public function testcompare_condition() {
272 272
 
273 273
     	$aowWorkFlow = new AOW_WorkFlow();
274 274
 
275 275
     	//execute the method and verify that it returns valid values for all operators
276 276
 
277
-    	$this->assertTrue($aowWorkFlow->compare_condition(1,1));
278
-    	$this->assertTrue($aowWorkFlow->compare_condition(1,2,'Not_Equal_To' ));
279
-    	$this->assertTrue($aowWorkFlow->compare_condition(2,1,'Greater_Than' ));
280
-    	$this->assertTrue($aowWorkFlow->compare_condition(1,2,'Less_Than' ));
281
-    	$this->assertTrue($aowWorkFlow->compare_condition(5,4,'Greater_Than_or_Equal_To' ));
282
-    	$this->assertTrue($aowWorkFlow->compare_condition(2,3,'Less_Than_or_Equal_To' ));
283
-    	$this->assertNotFalse($aowWorkFlow->compare_condition('test1','test','Contains' ));
284
-    	$this->assertNotFalse($aowWorkFlow->compare_condition('test1','test','Starts_With' ));
285
-    	$this->assertNotFalse($aowWorkFlow->compare_condition('test1','1','Ends_With' ));
286
-    	$this->assertTrue($aowWorkFlow->compare_condition('','','is_null' ));
287
-    	$this->assertTrue($aowWorkFlow->compare_condition('test2',array('test1','test2'),'One_of' ));
288
-    	$this->assertTrue($aowWorkFlow->compare_condition('test', array('test1','test2'),'Not_One_of' ));
277
+    	$this->assertTrue($aowWorkFlow->compare_condition(1, 1));
278
+    	$this->assertTrue($aowWorkFlow->compare_condition(1, 2, 'Not_Equal_To'));
279
+    	$this->assertTrue($aowWorkFlow->compare_condition(2, 1, 'Greater_Than'));
280
+    	$this->assertTrue($aowWorkFlow->compare_condition(1, 2, 'Less_Than'));
281
+    	$this->assertTrue($aowWorkFlow->compare_condition(5, 4, 'Greater_Than_or_Equal_To'));
282
+    	$this->assertTrue($aowWorkFlow->compare_condition(2, 3, 'Less_Than_or_Equal_To'));
283
+    	$this->assertNotFalse($aowWorkFlow->compare_condition('test1', 'test', 'Contains'));
284
+    	$this->assertNotFalse($aowWorkFlow->compare_condition('test1', 'test', 'Starts_With'));
285
+    	$this->assertNotFalse($aowWorkFlow->compare_condition('test1', '1', 'Ends_With'));
286
+    	$this->assertTrue($aowWorkFlow->compare_condition('', '', 'is_null'));
287
+    	$this->assertTrue($aowWorkFlow->compare_condition('test2', array('test1', 'test2'), 'One_of'));
288
+    	$this->assertTrue($aowWorkFlow->compare_condition('test', array('test1', 'test2'), 'Not_One_of'));
289 289
 
290 290
     }
291 291
 
292
-    public function testcheck_in_group(){
292
+    public function testcheck_in_group() {
293 293
 
294 294
     	$aowWorkFlow = new AOW_WorkFlow();
295 295
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     }
301 301
 
302 302
 
303
-    public function testrun_actions(){
303
+    public function testrun_actions() {
304 304
 
305 305
     	$aowWorkFlow = new AOW_WorkFlow();
306 306
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
     	//test for a entry in AOW_Processed table.
318 318
     	$processed = new AOW_Processed();
319
-    	$processed->retrieve_by_string_fields(array('aow_workflow_id' => 1,'parent_id' => 1));
319
+    	$processed->retrieve_by_string_fields(array('aow_workflow_id' => 1, 'parent_id' => 1));
320 320
 
321 321
     	//test for record ID to verify that record is saved
322 322
     	$this->assertTrue(isset($processed->id));
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
     	//mark the record as deleted and verify that this record cannot be retrieved anymore.
327 327
     	$processed->mark_deleted($processed->id);
328 328
     	$result = $processed->retrieve($processed->id);
329
-    	$this->assertEquals(null,$result);
329
+    	$this->assertEquals(null, $result);
330 330
 
331 331
     }
332 332
 
Please login to merge, or discard this patch.
tests/tests/modules/AOS_PDF_Templates/AOS_PDF_TemplatesTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 class AOS_PDF_TemplatesTest extends PHPUnit_Framework_TestCase {
4 4
 	
5
-	public function testAOS_PDF_Templates(){	
5
+	public function testAOS_PDF_Templates() {	
6 6
 
7 7
 
8 8
 		//execute the contructor and check for the Object type and  attributes
9 9
 		$aosPdfTemplates = new AOS_PDF_Templates();
10
-		$this->assertInstanceOf('AOS_PDF_Templates',$aosPdfTemplates);
11
-		$this->assertInstanceOf('Basic',$aosPdfTemplates);
12
-		$this->assertInstanceOf('SugarBean',$aosPdfTemplates);
10
+		$this->assertInstanceOf('AOS_PDF_Templates', $aosPdfTemplates);
11
+		$this->assertInstanceOf('Basic', $aosPdfTemplates);
12
+		$this->assertInstanceOf('SugarBean', $aosPdfTemplates);
13 13
 			
14 14
 		$this->assertAttributeEquals('AOS_PDF_Templates', 'module_dir', $aosPdfTemplates);
15 15
 		$this->assertAttributeEquals('AOS_PDF_Templates', 'object_name', $aosPdfTemplates);
Please login to merge, or discard this patch.
tests/tests/modules/Cases/CaseTest.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 		//execute the contructor and check for the Object type and  attributes
9 9
 		$aCase = new aCase();
10
-		$this->assertInstanceOf('aCase',$aCase);
11
-		$this->assertInstanceOf('Basic',$aCase);
12
-		$this->assertInstanceOf('SugarBean',$aCase);
10
+		$this->assertInstanceOf('aCase', $aCase);
11
+		$this->assertInstanceOf('Basic', $aCase);
12
+		$this->assertInstanceOf('SugarBean', $aCase);
13 13
 			
14 14
 		$this->assertAttributeEquals('Cases', 'module_dir', $aCase);
15 15
 		$this->assertAttributeEquals('Case', 'object_name', $aCase);
@@ -26,19 +26,19 @@  discard block
 block discarded – undo
26 26
 		error_reporting(E_ERROR | E_PARSE);
27 27
 		
28 28
 		$aCase = new aCase();
29
-		$this->assertEquals(Null,$aCase->get_summary_text());
29
+		$this->assertEquals(Null, $aCase->get_summary_text());
30 30
 		
31 31
 		$aCase->name = "test";
32
-		$this->assertEquals('test',$aCase->get_summary_text());
32
+		$this->assertEquals('test', $aCase->get_summary_text());
33 33
 
34 34
 	}
35 35
 
36
-	public function testlistviewACLHelper(){
36
+	public function testlistviewACLHelper() {
37 37
 
38 38
 		$aCase = new aCase();
39
-		$expected = array( "MAIN"=>"a", "ACCOUNT"=>"a");
39
+		$expected = array("MAIN"=>"a", "ACCOUNT"=>"a");
40 40
 		$actual = $aCase->listviewACLHelper();
41
-		$this->assertSame($expected,$actual);
41
+		$this->assertSame($expected, $actual);
42 42
 	
43 43
 	}
44 44
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		$aCase = new aCase();
119 119
 		
120 120
 		//test without setting attributes
121
-		$expected = array (
121
+		$expected = array(
122 122
 				'DELETED' => 0,
123 123
 				'STATE' => 'Open',
124 124
 				'UPDATE_TEXT' => '',
@@ -136,11 +136,11 @@  discard block
 block discarded – undo
136 136
 		
137 137
 		$actual = $aCase->get_list_view_data();
138 138
 		//$this->assertSame($expected ,$actual);
139
-		$this->assertEquals($expected['STATE'] ,$actual['STATE']);
140
-		$this->assertEquals($expected['UPDATE_TEXT'] ,$actual['UPDATE_TEXT']);
141
-		$this->assertEquals($expected['NAME'] ,$actual['NAME']);
142
-		$this->assertEquals($expected['PRIORITY'] ,$actual['PRIORITY']);
143
-		$this->assertRegExp($expected['SET_COMPLETE'] ,$actual['SET_COMPLETE']);
139
+		$this->assertEquals($expected['STATE'], $actual['STATE']);
140
+		$this->assertEquals($expected['UPDATE_TEXT'], $actual['UPDATE_TEXT']);
141
+		$this->assertEquals($expected['NAME'], $actual['NAME']);
142
+		$this->assertEquals($expected['PRIORITY'], $actual['PRIORITY']);
143
+		$this->assertRegExp($expected['SET_COMPLETE'], $actual['SET_COMPLETE']);
144 144
 		
145 145
 		
146 146
 		
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		$aCase->status = "Open_New";
151 151
 		$aCase->case_number = 1;
152 152
 		
153
-		$expected = array (
153
+		$expected = array(
154 154
 				'NAME' => 'test',
155 155
 				'DELETED' => 0,
156 156
 				'CASE_NUMBER' => 1,
@@ -164,30 +164,30 @@  discard block
 block discarded – undo
164 164
 		
165 165
 		$actual = $aCase->get_list_view_data();
166 166
 		//$this->assertSame($expected ,$actual);
167
-		$this->assertEquals($expected['NAME'] ,$actual['NAME']);
168
-		$this->assertEquals($expected['CASE_NUMBER'] ,$actual['CASE_NUMBER']);
169
-		$this->assertEquals($expected['STATUS'] ,$actual['STATUS']);
170
-		$this->assertEquals($expected['PRIORITY'] ,$actual['PRIORITY']);
171
-		$this->assertEquals($expected['STATE'] ,$actual['STATE']);
167
+		$this->assertEquals($expected['NAME'], $actual['NAME']);
168
+		$this->assertEquals($expected['CASE_NUMBER'], $actual['CASE_NUMBER']);
169
+		$this->assertEquals($expected['STATUS'], $actual['STATUS']);
170
+		$this->assertEquals($expected['PRIORITY'], $actual['PRIORITY']);
171
+		$this->assertEquals($expected['STATE'], $actual['STATE']);
172 172
 		
173 173
 		
174 174
 	}
175 175
 
176 176
 
177
-	public function testbuild_generic_where_clause () 
177
+	public function testbuild_generic_where_clause() 
178 178
 	{
179 179
 		$aCase = new aCase();
180 180
 		
181 181
 		//test with string
182 182
 		$expected = "(cases.name like 'test%' or accounts.name like 'test%')";
183 183
 		$actual = $aCase->build_generic_where_clause('test');
184
-		$this->assertSame($expected,$actual);
184
+		$this->assertSame($expected, $actual);
185 185
 		
186 186
 		
187 187
 		//test with number
188 188
 		$expected = "(cases.name like '1%' or accounts.name like '1%' or cases.case_number like '1%')";
189 189
 		$actual = $aCase->build_generic_where_clause(1);
190
-		$this->assertSame($expected,$actual);
190
+		$this->assertSame($expected, $actual);
191 191
 		
192 192
 	}
193 193
 
@@ -202,14 +202,14 @@  discard block
 block discarded – undo
202 202
 		
203 203
 		$result = $aCase->set_notification_body(new Sugar_Smarty(), $aCase);
204 204
 		
205
-		$this->assertEquals($aCase->name ,$result->_tpl_vars['CASE_SUBJECT']);
206
-		$this->assertEquals("High" ,$result->_tpl_vars['CASE_PRIORITY']);
207
-		$this->assertEquals("New" ,$result->_tpl_vars['CASE_STATUS']);
208
-		$this->assertEquals($aCase->description ,$result->_tpl_vars['CASE_DESCRIPTION']);
205
+		$this->assertEquals($aCase->name, $result->_tpl_vars['CASE_SUBJECT']);
206
+		$this->assertEquals("High", $result->_tpl_vars['CASE_PRIORITY']);
207
+		$this->assertEquals("New", $result->_tpl_vars['CASE_STATUS']);
208
+		$this->assertEquals($aCase->description, $result->_tpl_vars['CASE_DESCRIPTION']);
209 209
 		
210 210
 	}
211 211
 
212
-	public function testbean_implements(){
212
+	public function testbean_implements() {
213 213
 	
214 214
 		$aCase = new aCase();
215 215
 		$this->assertEquals(false, $aCase->bean_implements('')); //test with blank value
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 		
219 219
 	}
220 220
 
221
-	public function testsave(){
221
+	public function testsave() {
222 222
 
223 223
 		$aCase = new aCase();
224 224
 		$aCase->name = "test";
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 		//mark the record as deleted and verify that this record cannot be retrieved anymore.
235 235
 		$aCase->mark_deleted($aCase->id);
236 236
 		$result = $aCase->retrieve($aCase->id);
237
-		$this->assertEquals(null,$result);
237
+		$this->assertEquals(null, $result);
238 238
 		 
239 239
 	}
240 240
 
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
 		
244 244
 		$aCase = new aCase();
245 245
 		$result = $aCase->getEmailSubjectMacro();
246
-		$this->assertEquals("[CASE:%1]",$result);
246
+		$this->assertEquals("[CASE:%1]", $result);
247 247
 		
248 248
 	}
249 249
 
250
-	public function testgetAccount(){
250
+	public function testgetAccount() {
251 251
 
252 252
 		$aCase = new aCase();
253 253
 		$result = $aCase->getAccount(1);
Please login to merge, or discard this patch.
tests/tests/modules/Groups/GroupTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
 
7 7
 		//execute the contructor and check for the Object type and  attributes
8 8
 		$group = new Group();
9
-		$this->assertInstanceOf('Group',$group);
10
-		$this->assertInstanceOf('User',$group);
11
-		$this->assertInstanceOf('SugarBean',$group);
9
+		$this->assertInstanceOf('Group', $group);
10
+		$this->assertInstanceOf('User', $group);
11
+		$this->assertInstanceOf('SugarBean', $group);
12 12
 		
13 13
 		$this->assertAttributeEquals('Group', 'status', $group);
14 14
 		$this->assertAttributeEquals('', 'password', $group);
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
 		
41 41
 		//test with empty string params
42 42
 		$expected = "SELECT users.* FROM users  WHERE  users.deleted = 0 ORDER BY users.user_name";
43
-		$actual = $group->create_export_query('','');
44
-		$this->assertSame($expected,$actual);
43
+		$actual = $group->create_export_query('', '');
44
+		$this->assertSame($expected, $actual);
45 45
 
46 46
 		
47 47
 		//test with valid string params
48 48
 		$expected = "SELECT users.* FROM users  WHERE users.user_name=\"\" AND  users.deleted = 0 ORDER BY users.id";
49
-		$actual = $group->create_export_query('users.id','users.user_name=""');
50
-		$this->assertSame($expected,$actual);
49
+		$actual = $group->create_export_query('users.id', 'users.user_name=""');
50
+		$this->assertSame($expected, $actual);
51 51
 		
52 52
 	}
53 53
 	
Please login to merge, or discard this patch.
tests/tests/modules/AOD_Index/AOD_IndexTest.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
 class AOD_IndexTest extends PHPUnit_Framework_TestCase {
4 4
 
5 5
 	
6
-	public function testAOD_Index(){
6
+	public function testAOD_Index() {
7 7
 
8 8
 		//execute the contructor and check for the Object type and type attribute
9 9
 		$aod_index = new AOD_Index();
10
-		$this->assertInstanceOf('AOD_Index',$aod_index);
11
-		$this->assertInstanceOf('Basic',$aod_index);
12
-		$this->assertInstanceOf('SugarBean',$aod_index);
10
+		$this->assertInstanceOf('AOD_Index', $aod_index);
11
+		$this->assertInstanceOf('Basic', $aod_index);
12
+		$this->assertInstanceOf('SugarBean', $aod_index);
13 13
 		
14 14
 		$this->assertAttributeEquals('AOD_Index', 'module_dir', $aod_index);
15 15
 		$this->assertAttributeEquals('AOD_Index', 'object_name', $aod_index);
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		
22 22
     }
23 23
 
24
-    public function testisEnabled(){
24
+    public function testisEnabled() {
25 25
     	
26 26
     	error_reporting(E_ERROR | E_PARSE);
27 27
     	
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     	
34 34
     }
35 35
 
36
-    public function testfind(){
36
+    public function testfind() {
37 37
 		
38 38
     	
39 39
     	$aod_index = new AOD_Index();
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      	    	
54 54
     }
55 55
 
56
-    public function testoptimise(){
56
+    public function testoptimise() {
57 57
 
58 58
     	$aod_index = new AOD_Index();
59 59
     	$aod_index->id = 1;
@@ -67,20 +67,20 @@  discard block
 block discarded – undo
67 67
     	    	
68 68
     }
69 69
 
70
-    public function testgetIndex(){
70
+    public function testgetIndex() {
71 71
 		
72 72
     	$aod_index = new AOD_Index();
73 73
     	$result = $aod_index->getIndex();
74 74
     	
75 75
     	
76 76
     	//execute the method and verify it returns a different instance of samme type 
77
-    	$this->assertInstanceOf('AOD_Index',$result);
77
+    	$this->assertInstanceOf('AOD_Index', $result);
78 78
   		$this->assertNotSame($aod_index, $result);  	
79 79
     	
80 80
     }
81 81
 
82 82
 
83
-    public function testgetDocumentForBean(){
83
+    public function testgetDocumentForBean() {
84 84
     	
85 85
     	$user = new User(1);
86 86
     	
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     	
98 98
     }
99 99
 
100
-    public function testcommit(){
100
+    public function testcommit() {
101 101
   
102 102
     	$aod_index = new AOD_Index();
103 103
     	$aod_index->id = 1;
@@ -115,32 +115,32 @@  discard block
 block discarded – undo
115 115
  
116 116
     }
117 117
 
118
-    public function testisModuleSearchable(){
118
+    public function testisModuleSearchable() {
119 119
   
120 120
     	
121 121
     	//test with an invalid module
122
-    	$this->assertFalse(AOD_Index::isModuleSearchable('',''));
122
+    	$this->assertFalse(AOD_Index::isModuleSearchable('', ''));
123 123
     	
124 124
     	
125 125
     	//test for modules that are searchable
126
-    	$this->assertTrue(AOD_Index::isModuleSearchable('DocumentRevisions','DocumentRevision'));
127
-    	$this->assertTrue(AOD_Index::isModuleSearchable('Cases','Case'));
128
-    	$this->assertTrue(AOD_Index::isModuleSearchable('Accounts','Account'));
126
+    	$this->assertTrue(AOD_Index::isModuleSearchable('DocumentRevisions', 'DocumentRevision'));
127
+    	$this->assertTrue(AOD_Index::isModuleSearchable('Cases', 'Case'));
128
+    	$this->assertTrue(AOD_Index::isModuleSearchable('Accounts', 'Account'));
129 129
     	
130 130
     	
131 131
     	//test for modules that are not searchable
132
-    	$this->assertFalse(AOD_Index::isModuleSearchable('AOD_IndexEvent','AOD_IndexEvent'));
133
-    	$this->assertFalse(AOD_Index::isModuleSearchable('AOD_Index','AOD_Index'));
134
-    	$this->assertFalse(AOD_Index::isModuleSearchable('AOW_Actions','AOW_Action'));
135
-    	$this->assertFalse(AOD_Index::isModuleSearchable('AOW_Conditions','AOW_Condition'));
136
-    	$this->assertFalse(AOD_Index::isModuleSearchable('AOW_Processed','AOW_Processed'));
137
-    	$this->assertFalse(AOD_Index::isModuleSearchable('SchedulersJobs','SchedulersJob'));
138
-    	$this->assertFalse(AOD_Index::isModuleSearchable('Users','User'));
132
+    	$this->assertFalse(AOD_Index::isModuleSearchable('AOD_IndexEvent', 'AOD_IndexEvent'));
133
+    	$this->assertFalse(AOD_Index::isModuleSearchable('AOD_Index', 'AOD_Index'));
134
+    	$this->assertFalse(AOD_Index::isModuleSearchable('AOW_Actions', 'AOW_Action'));
135
+    	$this->assertFalse(AOD_Index::isModuleSearchable('AOW_Conditions', 'AOW_Condition'));
136
+    	$this->assertFalse(AOD_Index::isModuleSearchable('AOW_Processed', 'AOW_Processed'));
137
+    	$this->assertFalse(AOD_Index::isModuleSearchable('SchedulersJobs', 'SchedulersJob'));
138
+    	$this->assertFalse(AOD_Index::isModuleSearchable('Users', 'User'));
139 139
     	
140 140
  
141 141
     }
142 142
 
143
-    public function testindex(){
143
+    public function testindex() {
144 144
   
145 145
     	$aod_index = new AOD_Index();
146 146
     	$aod_index->id = 1;
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
     	
155 155
     	//test with a searchable module but invalid bean id, it will still index it
156 156
     	$result = $aod_index->index("Accounts", 1);
157
-    	$this->assertEquals(Null,$result);
157
+    	$this->assertEquals(Null, $result);
158 158
     	
159 159
  
160 160
     }
161 161
   
162 162
 
163
-    public function testremove(){
163
+    public function testremove() {
164 164
   
165 165
     	$aod_index = new AOD_Index();
166 166
     	$aod_index->id = 1;
@@ -178,10 +178,10 @@  discard block
 block discarded – undo
178 178
     	  	
179 179
     }
180 180
 
181
-    public function testgetIndexableModules(){
181
+    public function testgetIndexableModules() {
182 182
   
183 183
     	
184
-    	$expected = Array (
184
+    	$expected = Array(
185 185
     			'AM_ProjectTemplates' => 'AM_ProjectTemplates',
186 186
     			'AM_TaskTemplates' => 'AM_TaskTemplates',
187 187
     			'AOK_KnowledgeBase' => 'AOK_KnowledgeBase',
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     	
223 223
     	//execute the method and verify that it retunrs expected results
224 224
     	$actual = $aod_index->getIndexableModules();
225
-    	$this->assertSame( $expected, $actual);
225
+    	$this->assertSame($expected, $actual);
226 226
     
227 227
     }
228 228
 
Please login to merge, or discard this patch.