Completed
Push — CI ( ee6bd7...0f01dd )
by Adam
22:32
created
tests/tests/include/utils/sugarFileUtilsTest.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@  discard block
 block discarded – undo
17 17
 		$dir = "vfs://root";
18 18
 		
19 19
 		//non recursive
20
-		$result = sugar_mkdir($dir . "/mkdirTest");
21
-		$this->assertFileExists($dir . "/mkdirTest");
20
+		$result = sugar_mkdir($dir."/mkdirTest");
21
+		$this->assertFileExists($dir."/mkdirTest");
22 22
 		$this->assertTrue($result);
23 23
 		
24 24
 		//recursive
25
-		$result = sugar_mkdir($dir . "/mkdirTest/test",null,true);
26
-		$this->assertFileExists($dir . "/mkdirTest/test");
25
+		$result = sugar_mkdir($dir."/mkdirTest/test", null, true);
26
+		$this->assertFileExists($dir."/mkdirTest/test");
27 27
 		$this->assertTrue($result);
28 28
 	}
29 29
 	
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 		//execute the method and test if it doesn't returns false and returns the number of bytes written
41 41
 
42 42
         $dir = "vfs://root";
43
-		$result = sugar_file_put_contents( $dir . '/testfile.txt', 'some test data');
43
+		$result = sugar_file_put_contents($dir.'/testfile.txt', 'some test data');
44 44
 		$this->assertNotFalse($result);
45
-		$this->assertEquals(14,$result);
45
+		$this->assertEquals(14, $result);
46 46
 	}
47 47
 
48 48
 	
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $this->markTestSkipped('Atomic file put cannot be tested with vfsStream');
53 53
 		//execute the method and test if it returns success(true)
54 54
         $dir = "vfs://root";
55
-		$result = sugar_file_put_contents_atomic( $dir . '/atomictestfile.txt', 'some test data');
55
+		$result = sugar_file_put_contents_atomic($dir.'/atomictestfile.txt', 'some test data');
56 56
 		$this->assertTrue($result);
57 57
 	}
58 58
 	
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	{
62 62
 		//execute the method and test if it doesn't returns false and returns the expected contents
63 63
         $dir = "vfs://root";
64
-		$result = file_get_contents( $dir . '/test.txt');
64
+		$result = file_get_contents($dir.'/test.txt');
65 65
 		
66 66
 		$this->assertNotFalse($result);
67
-		$this->assertEquals('Hello world!',$result);
67
+		$this->assertEquals('Hello world!', $result);
68 68
 	}
69 69
 	
70 70
 
@@ -73,19 +73,19 @@  discard block
 block discarded – undo
73 73
 		//execute the method and test if it returns success(true)
74 74
 
75 75
         $dir = "vfs://root";
76
-		$test_dt = time() - 3600 ; 
77
-		$expected = date("m d Y H:i:s",  time() - 3600 );
76
+		$test_dt = time() - 3600; 
77
+		$expected = date("m d Y H:i:s", time() - 3600);
78 78
 		
79 79
 		//test wihout modified date param
80
-		$result = sugar_touch( $dir . '/testfiletouch.txt');
80
+		$result = sugar_touch($dir.'/testfiletouch.txt');
81 81
 		$this->assertTrue($result);		
82 82
 		
83 83
 		//test wih modified date param
84
-		$result = sugar_touch( $dir . '/testfiletouch.txt',$test_dt,$test_dt);
85
-		$file_dt = date ("m d Y H:i:s", filemtime($dir . '/testfiletouch.txt')) ;
84
+		$result = sugar_touch($dir.'/testfiletouch.txt', $test_dt, $test_dt);
85
+		$file_dt = date("m d Y H:i:s", filemtime($dir.'/testfiletouch.txt'));
86 86
 		
87 87
 		$this->assertTrue($result);
88
-		$this->assertSame($file_dt, $expected );
88
+		$this->assertSame($file_dt, $expected);
89 89
 	}
90 90
 	
91 91
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $this->markTestSkipped('Permissions cannot be tested with vfsStream');
95 95
 		//execute the method and test if it returns success(true)
96 96
         $dir = "vfs://test";
97
-		$result = sugar_chmod($dir . '/test.txt',0777);
97
+		$result = sugar_chmod($dir.'/test.txt', 0777);
98 98
 		$this->assertTrue($result);
99 99
 	}
100 100
 	
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
         $this->markTestSkipped('Permissions cannot be tested with vfsStream');
105 105
 		//execute the method and test if it returns success(true)
106 106
         $dir = "vfs://test";
107
-		$result = sugar_chown($dir . '/test.txt');
107
+		$result = sugar_chown($dir.'/test.txt');
108 108
 		$this->assertFalse($result);
109 109
 
110
-        $result = sugar_chown($dir . '/test.txt',org\bovigo\vfs\vfsStream::getCurrentUser());
110
+        $result = sugar_chown($dir.'/test.txt', org\bovigo\vfs\vfsStream::getCurrentUser());
111 111
         $this->assertTrue($result);
112 112
 
113 113
 	}
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
         $this->markTestSkipped('Permissions cannot be tested with vfsStream');
119 119
 		//execute the method and test if it returns success(true)
120 120
         $dir = "vfs://test";
121
-		$result = sugar_chgrp($dir . '/test.txt');
121
+		$result = sugar_chgrp($dir.'/test.txt');
122 122
 		$this->assertFalse($result);
123 123
 
124
-        $result = sugar_chgrp($dir . '/test.txt',org\bovigo\vfs\vfsStream::getCurrentGroup());
124
+        $result = sugar_chgrp($dir.'/test.txt', org\bovigo\vfs\vfsStream::getCurrentGroup());
125 125
         $this->assertFalse($result);
126 126
 	}
127 127
 	
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
 	public function testget_mode()
130 130
 	{
131 131
 		//test with all mods defined in config
132
-		$this->assertSame(1528,get_mode());
133
-		$this->assertSame(1528,get_mode('dir_mode', 10));
134
-		$this->assertSame(493,get_mode('file_mode', 10));
135
-		$this->assertSame('',get_mode('user', 10));
136
-		$this->assertSame('',get_mode('group', 10));
132
+		$this->assertSame(1528, get_mode());
133
+		$this->assertSame(1528, get_mode('dir_mode', 10));
134
+		$this->assertSame(493, get_mode('file_mode', 10));
135
+		$this->assertSame('', get_mode('user', 10));
136
+		$this->assertSame('', get_mode('group', 10));
137 137
 	}
138 138
 
139 139
 	public function testsugar_is_dir()
@@ -158,9 +158,9 @@  discard block
 block discarded – undo
158 158
 	{
159 159
 		$cache_dir = rtrim($GLOBALS['sugar_config']['cache_dir'], '/\\');
160 160
 		
161
-		$this->assertSame($cache_dir . '/', sugar_cached('')); //invalid file
162
-		$this->assertSame($cache_dir . '/config', sugar_cached('config')); //valid file		
163
-		$this->assertSame($cache_dir . '/modules' , sugar_cached('modules')); //valid file
161
+		$this->assertSame($cache_dir.'/', sugar_cached('')); //invalid file
162
+		$this->assertSame($cache_dir.'/config', sugar_cached('config')); //valid file		
163
+		$this->assertSame($cache_dir.'/modules', sugar_cached('modules')); //valid file
164 164
 		
165 165
 	}
166 166
 
Please login to merge, or discard this patch.
tests/tests/include/utils/logicUtilsTest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -11,37 +11,37 @@  discard block
 block discarded – undo
11 11
 	public function testget_hook_array()
12 12
 	{
13 13
 		//test with a vaid module. it will return an array
14
-		$AccountsHooks =  get_hook_array('Accounts');
14
+		$AccountsHooks = get_hook_array('Accounts');
15 15
 		$this->assertTrue(is_array($AccountsHooks));
16 16
 		
17 17
 		//test with an invalid array. it will throw an file include exception.
18 18
 		$BugsHooks = "";
19
-		try{
20
-			$BugsHooks =  get_hook_array('Bugs');
21
-		}catch(Exception $e){}
19
+		try {
20
+			$BugsHooks = get_hook_array('Bugs');
21
+		}catch (Exception $e) {}
22 22
 		
23 23
 		$this->assertFalse(is_array($BugsHooks));
24 24
 		
25 25
 	}
26 26
 	
27 27
 	
28
-	private function getTestHook(){
28
+	private function getTestHook() {
29 29
 		
30 30
 		//array containing hooks array to test
31 31
 		
32 32
         $hook_array = Array();
33 33
         $hook_array['after_ui_footer'] = Array();
34
-        $hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload');
34
+        $hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'popup_onload');
35 35
         $hook_array['after_ui_frame'] = Array();
36
-        $hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign');
37
-        $hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js');
36
+        $hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'mass_assign');
37
+        $hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php', 'hooks', 'load_js');
38 38
         $hook_array['after_save'] = Array();
39
-        $hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select');
40
-        $hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges');
39
+        $hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'popup_select');
40
+        $hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleChanges');
41 41
         $hook_array['after_delete'] = array();
42
-        $hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete');
42
+        $hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleDelete');
43 43
         $hook_array['after_restore'] = array();
44
-        $hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore');
44
+        $hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleRestore');
45 45
         
46 46
 		return $hook_array;
47 47
 	}
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 		
53 53
 		$hook_array = $this->getTestHook();
54 54
 		return array(
55
-				array($hook_array,'after_save',array(0,'popup_select'), true),
56
-				array($hook_array,'after_save',array(0,'foo'), false),
57
-				array($hook_array,'foo',array(0,'popup_select'), false),
55
+				array($hook_array, 'after_save', array(0, 'popup_select'), true),
56
+				array($hook_array, 'after_save', array(0, 'foo'), false),
57
+				array($hook_array, 'foo', array(0, 'popup_select'), false),
58 58
 		);	
59 59
 	}
60 60
 	
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	public function testcheck_existing_element($hook_array, $event, $action_array, $expected)
65 65
 	{
66 66
 		//test with dataset containing valid and invalid cases
67
-		$this->assertSame( check_existing_element($hook_array,$event, $action_array) , $expected);
67
+		$this->assertSame(check_existing_element($hook_array, $event, $action_array), $expected);
68 68
 		
69 69
 	}
70 70
 	
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		
75 75
 		$hook_array = $this->getTestHook();
76 76
 		$expected = "<?php\n// Do not store anything in this file that is not part of the array or the hook version.  This file will	\n// be automatically rebuilt in the future. \n \$hook_version = 1; \n\$hook_array = Array(); \n// position, file, function \n\$hook_array['after_ui_footer'] = Array(); \n\$hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload'); \n\$hook_array['after_ui_frame'] = Array(); \n\$hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign'); \n\$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js'); \n\$hook_array['after_save'] = Array(); \n\$hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select'); \n\$hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges'); \n\$hook_array['after_delete'] = Array(); \n\$hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete'); \n\$hook_array['after_restore'] = Array(); \n\$hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore'); \n\n\n\n?>";
77
-		$this->assertEquals($expected,replace_or_add_logic_type($hook_array));
77
+		$this->assertEquals($expected, replace_or_add_logic_type($hook_array));
78 78
 		
79 79
 	}
80 80
 	
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
 	
86 86
 		$vfs = vfsStream::setup('custom/modules/TEST_Test');
87 87
 	
88
-		if ( $vfs->hasChild('logic_hooks.php')  == true) {
88
+		if ($vfs->hasChild('logic_hooks.php') == true) {
89 89
 			unlink('custom/modules/TEST_Test/logic_hooks.php');
90 90
 			rmdir('custom/modules/TEST_Test');
91 91
 		}
92 92
 		
93 93
 		$expectedContents = "<?php\n// Do not store anything in this file that is not part of the array or the hook version.  This file will	\n// be automatically rebuilt in the future. \n \$hook_version = 1; \n\$hook_array = Array(); \n// position, file, function \n\$hook_array['after_ui_footer'] = Array(); \n\$hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload'); \n\$hook_array['after_ui_frame'] = Array(); \n\$hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign'); \n\$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js'); \n\$hook_array['after_save'] = Array(); \n\$hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select'); \n\$hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges'); \n\$hook_array['after_delete'] = Array(); \n\$hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete'); \n\$hook_array['after_restore'] = Array(); \n\$hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore'); \n\n\n\n?>";
94
-		write_logic_file('TEST_Test',$expectedContents);
94
+		write_logic_file('TEST_Test', $expectedContents);
95 95
 		
96 96
 		//Check file created
97 97
 		$this->assertFileExists('custom/modules/TEST_Test/logic_hooks.php');
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		
116 116
 		$hook_array = $this->getTestHook();
117 117
 		$expected = "// Do not store anything in this file that is not part of the array or the hook version.  This file will	\n// be automatically rebuilt in the future. \n \$hook_version = 1; \n\$hook_array = Array(); \n// position, file, function \n\$hook_array['after_ui_footer'] = Array(); \n\$hook_array['after_ui_footer'][] = Array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_onload'); \n\$hook_array['after_ui_frame'] = Array(); \n\$hook_array['after_ui_frame'][] = Array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'mass_assign'); \n\$hook_array['after_ui_frame'][] = Array(1, 'Load Social JS', 'custom/include/social/hooks.php','hooks', 'load_js'); \n\$hook_array['after_save'] = Array(); \n\$hook_array['after_save'][] = Array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups', 'popup_select'); \n\$hook_array['after_save'][] = Array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleChanges'); \n\$hook_array['after_delete'] = Array(); \n\$hook_array['after_delete'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleDelete'); \n\$hook_array['after_restore'] = Array(); \n\$hook_array['after_restore'][] = Array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php','AOD_LogicHooks', 'saveModuleRestore'); \n\n\n";
118
-		$this->assertEquals($expected,build_logic_file($hook_array));	
118
+		$this->assertEquals($expected, build_logic_file($hook_array));	
119 119
 	}
120 120
 	
121 121
 }
Please login to merge, or discard this patch.
tests/tests/include/utils/dbUtilsTest.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@  discard block
 block discarded – undo
10 10
 	{
11 11
 		//array containing all possible types supported by db_convert
12 12
 		return array(
13
-				array(gmdate('Y-m-d H:i:s'),'today',array(),'CURDATE()'),
14
-				array('text','left',array(2),'LEFT(text,2)'),
15
-				array('2015-11-16 19:10:52','date_format',array(),'DATE_FORMAT(2015-11-16 19:10:52,\'%Y-%m-%d\')'),
16
-				array('2015-11-16 19:10:52','time_format',array(), '2015-11-16 19:10:52' ),
17
-				array('2015-11-16','date',array(), '2015-11-16' ),
18
-				array('19:10:52','time',array(), '19:10:52' ),
19
-				array('2015-11-16 19:10:52','datetime',array(), '2015-11-16 19:10:52'),
20
-				array(Null,'ifnull',array(0), 'IFNULL(0)' ),
21
-				array('value1 ','concat',array('value2'), 'CONCAT(value1 ,value2)' ), 
22
-				array('2015-11-16 19:10:52','quarter',array(), 'QUARTER(2015-11-16 19:10:52)' ),
23
-				array('value1','length',array(), 'LENGTH(value1)' ),
24
-				array('2015-11-16 19:32:29', 'month',array(), 'MONTH(2015-11-16 19:32:29)' ),
25
-				array('2015-11-16','add_date',array('1','DAY'), 'DATE_ADD(2015-11-16, INTERVAL 1 DAY)' ),
26
-				array('19:10:52','add_time',array('1', 'HOUR'), 'DATE_ADD(19:10:52, INTERVAL + CONCAT(1, \':\', HOUR) HOUR_MINUTE)' ),
27
-				array('col','avg',array(2), 'avg(col)' ),
28
-				array('2015-11-16 19:32:29','add_tz_offset',array(), '2015-11-16 19:32:29 + INTERVAL 0 MINUTE' ),
13
+				array(gmdate('Y-m-d H:i:s'), 'today', array(), 'CURDATE()'),
14
+				array('text', 'left', array(2), 'LEFT(text,2)'),
15
+				array('2015-11-16 19:10:52', 'date_format', array(), 'DATE_FORMAT(2015-11-16 19:10:52,\'%Y-%m-%d\')'),
16
+				array('2015-11-16 19:10:52', 'time_format', array(), '2015-11-16 19:10:52'),
17
+				array('2015-11-16', 'date', array(), '2015-11-16'),
18
+				array('19:10:52', 'time', array(), '19:10:52'),
19
+				array('2015-11-16 19:10:52', 'datetime', array(), '2015-11-16 19:10:52'),
20
+				array(Null, 'ifnull', array(0), 'IFNULL(0)'),
21
+				array('value1 ', 'concat', array('value2'), 'CONCAT(value1 ,value2)'), 
22
+				array('2015-11-16 19:10:52', 'quarter', array(), 'QUARTER(2015-11-16 19:10:52)'),
23
+				array('value1', 'length', array(), 'LENGTH(value1)'),
24
+				array('2015-11-16 19:32:29', 'month', array(), 'MONTH(2015-11-16 19:32:29)'),
25
+				array('2015-11-16', 'add_date', array('1', 'DAY'), 'DATE_ADD(2015-11-16, INTERVAL 1 DAY)'),
26
+				array('19:10:52', 'add_time', array('1', 'HOUR'), 'DATE_ADD(19:10:52, INTERVAL + CONCAT(1, \':\', HOUR) HOUR_MINUTE)'),
27
+				array('col', 'avg', array(2), 'avg(col)'),
28
+				array('2015-11-16 19:32:29', 'add_tz_offset', array(), '2015-11-16 19:32:29 + INTERVAL 0 MINUTE'),
29 29
 				
30 30
 		);
31 31
 	}
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 	public function testdb_convert($string, $type, $params, $expected)
37 37
 	{
38 38
 		//execute the method and test if it returns expected values for all types
39
-		$actual = db_convert($string, $type,$params);
40
-		$this->assertSame($expected,$actual);
39
+		$actual = db_convert($string, $type, $params);
40
+		$this->assertSame($expected, $actual);
41 41
 	}
42 42
 	
43 43
 	
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 		//execute the method and test if it returns expected values
49 49
 		
50 50
 		$table = "Table1"; 
51
-		$fields = Array('Col1','Col2','Col3');
51
+		$fields = Array('Col1', 'Col2', 'Col3');
52 52
 		$expected = "LTRIM(RTRIM(CONCAT(IFNULL(Table1.Col1,''),'',IFNULL(Table1.Col2,''),'',IFNULL(Table1.Col3,''))))";
53 53
 		$actual = db_concat($table, $fields);
54
-		$this->assertSame($expected,$actual);
54
+		$this->assertSame($expected, $actual);
55 55
 	}
56 56
 	
57 57
 	
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 	{
60 60
 		//execute the method and test if it returns expected values
61 61
 		
62
-		$this->assertSame("2015-11-16 19:32:29", from_db_convert("2015-11-16 19:32:29","date")); 
63
-		$this->assertSame("19:32:29",from_db_convert("19:32:29","time"));
64
-		$this->assertSame("2015-11-16 19:32:29",from_db_convert("2015-11-16 19:32:29","datetime"));
65
-		$this->assertSame("2015-11-16 19:32:29",from_db_convert("2015-11-16 19:32:29","datetimecombo"));
66
-		$this->assertSame("2015-11-16 19:32:29",from_db_convert("2015-11-16 19:32:29","timestamp"));
62
+		$this->assertSame("2015-11-16 19:32:29", from_db_convert("2015-11-16 19:32:29", "date")); 
63
+		$this->assertSame("19:32:29", from_db_convert("19:32:29", "time"));
64
+		$this->assertSame("2015-11-16 19:32:29", from_db_convert("2015-11-16 19:32:29", "datetime"));
65
+		$this->assertSame("2015-11-16 19:32:29", from_db_convert("2015-11-16 19:32:29", "datetimecombo"));
66
+		$this->assertSame("2015-11-16 19:32:29", from_db_convert("2015-11-16 19:32:29", "timestamp"));
67 67
 		
68 68
 	}
69 69
 	
@@ -75,12 +75,12 @@  discard block
 block discarded – undo
75 75
 		$string = "";
76 76
 		$expected = "";
77 77
 		$actual = to_html($string);
78
-		$this->assertSame($expected,$actual);
78
+		$this->assertSame($expected, $actual);
79 79
 		
80 80
 		$string = "'test'&trial<\">";
81 81
 		$expected = "&#039;test&#039;&trial&lt;&quot;&gt;";
82 82
 		$actual = to_html($string);
83
-		$this->assertSame($expected,$actual);
83
+		$this->assertSame($expected, $actual);
84 84
 		
85 85
 	}
86 86
 	
@@ -92,26 +92,26 @@  discard block
 block discarded – undo
92 92
 		$string = "";
93 93
 		$expected = "";
94 94
 		$actual = from_html($string);
95
-		$this->assertSame($expected,$actual);
95
+		$this->assertSame($expected, $actual);
96 96
 		
97 97
 		$string = "&#039;test&#039;&trial&lt;&quot;&gt;";
98 98
 		$expected = "'test'&trial<\">"; 
99 99
 		$actual = from_html($string);
100
-		$this->assertSame($expected,$actual);
100
+		$this->assertSame($expected, $actual);
101 101
 		
102 102
 	}
103 103
 	
104 104
 	
105 105
 	public function testgetValidDBName()
106 106
 	{
107
-		$expected ="";
107
+		$expected = "";
108 108
 		$actual = getValidDBName("");
109
-		$this->assertSame($expected,$actual);
109
+		$this->assertSame($expected, $actual);
110 110
 		
111 111
 		
112 112
 		$expected = "col";
113 113
 		$actual = getValidDBName("Col");
114
-		$this->assertSame($expected,$actual);
114
+		$this->assertSame($expected, $actual);
115 115
 		
116 116
 	}
117 117
 	
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
 	{
121 121
 		//valid value
122 122
 		$expected = true;
123
-		$actual = isValidDBName("suitecrmtest","mysql");
124
-		$this->assertSame($expected,$actual);
123
+		$actual = isValidDBName("suitecrmtest", "mysql");
124
+		$this->assertSame($expected, $actual);
125 125
 
126 126
 		//invalid value
127 127
 		$expected = false;
128
-		$actual = isValidDBName("suite/crm.test","mysql");
129
-		$this->assertSame($expected,$actual);
128
+		$actual = isValidDBName("suite/crm.test", "mysql");
129
+		$this->assertSame($expected, $actual);
130 130
 		
131 131
 		
132 132
 	}
Please login to merge, or discard this patch.
tests/tests/include/utils/layoutUtilsTest.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -14,19 +14,19 @@  discard block
 block discarded – undo
14 14
 		
15 15
 		//help param true
16 16
 		$html1 = get_form_header("test Header", "test subheader", true);
17
-		$this->assertGreaterThan(0,strlen($html1));
18
-		$this->assertNotFalse(strpos($html1,"test Header"));
19
-		$this->assertNotFalse(strpos($html1,"test subheader"));
17
+		$this->assertGreaterThan(0, strlen($html1));
18
+		$this->assertNotFalse(strpos($html1, "test Header"));
19
+		$this->assertNotFalse(strpos($html1, "test subheader"));
20 20
 		
21 21
 		
22 22
 		// help param false
23 23
 		$html2 = get_form_header("new test Header", "new test subheader", false);
24
-		$this->assertGreaterThan(0,strlen($html2));
25
-		$this->assertNotFalse(strpos($html2,"new test Header"));
26
-		$this->assertNotFalse(strpos($html2,"new test subheader"));
24
+		$this->assertGreaterThan(0, strlen($html2));
25
+		$this->assertNotFalse(strpos($html2, "new test Header"));
26
+		$this->assertNotFalse(strpos($html2, "new test subheader"));
27 27
 		
28 28
 		
29
-		$this->assertGreaterThan(strlen($html2),strlen($html1));
29
+		$this->assertGreaterThan(strlen($html2), strlen($html1));
30 30
 		
31 31
 	}
32 32
 	
@@ -36,25 +36,25 @@  discard block
 block discarded – undo
36 36
 		//execute the method and test if it returns html and contains the values provided in parameters
37 37
 		
38 38
 		//with show_create true, generates more html
39
-		$html1 = get_module_title("Users", "Users Home", true );
40
-		$this->assertGreaterThan(0,strlen($html1));
41
-		$this->assertNotFalse(strpos($html1,"Users"));
42
-		$this->assertNotFalse(strpos($html1,"Users Home"));
39
+		$html1 = get_module_title("Users", "Users Home", true);
40
+		$this->assertGreaterThan(0, strlen($html1));
41
+		$this->assertNotFalse(strpos($html1, "Users"));
42
+		$this->assertNotFalse(strpos($html1, "Users Home"));
43 43
 		
44 44
 		//with show_create false, generates less html
45
-		$html2 = get_module_title("Users", "Users Home", false );
46
-		$this->assertGreaterThan(0,strlen($html2));
47
-		$this->assertNotFalse(strpos($html2,"Users"));
48
-		$this->assertNotFalse(strpos($html2,"Users Home"));
49
-		$this->assertGreaterThan(strlen($html2),strlen($html1));
45
+		$html2 = get_module_title("Users", "Users Home", false);
46
+		$this->assertGreaterThan(0, strlen($html2));
47
+		$this->assertNotFalse(strpos($html2, "Users"));
48
+		$this->assertNotFalse(strpos($html2, "Users Home"));
49
+		$this->assertGreaterThan(strlen($html2), strlen($html1));
50 50
 
51 51
 		//with show_create flase and count > 1, generates more html compared to count =0
52
-		$html3 = get_module_title("Users", "Users Home", false, 2 );
53
-		$this->assertGreaterThan(0,strlen($html3));
54
-		$this->assertNotFalse(strpos($html3,"Users"));
55
-		$this->assertNotFalse(strpos($html3,"Users Home"));
56
-		$this->assertGreaterThan(strlen($html2),strlen($html3));
57
-		$this->assertGreaterThan(strlen($html3),strlen($html1));
52
+		$html3 = get_module_title("Users", "Users Home", false, 2);
53
+		$this->assertGreaterThan(0, strlen($html3));
54
+		$this->assertNotFalse(strpos($html3, "Users"));
55
+		$this->assertNotFalse(strpos($html3, "Users Home"));
56
+		$this->assertGreaterThan(strlen($html2), strlen($html3));
57
+		$this->assertGreaterThan(strlen($html3), strlen($html1));
58 58
 		
59 59
 	}
60 60
 	
@@ -65,15 +65,15 @@  discard block
 block discarded – undo
65 65
 		
66 66
 		//with show_create false, generates less html
67 67
 		$html1 = getClassicModuleTitle("users", Array('Users Home'));
68
-		$this->assertGreaterThan(0,strlen($html1));
69
-		$this->assertNotFalse(strpos($html1,"Users Home"));
68
+		$this->assertGreaterThan(0, strlen($html1));
69
+		$this->assertNotFalse(strpos($html1, "Users Home"));
70 70
 		
71 71
 
72 72
 		//with show_create true, generates more html
73
-		$html2 = getClassicModuleTitle("users", Array('Users Home'),true);
74
-		$this->assertGreaterThan(0,strlen($html2));
75
-		$this->assertNotFalse(strpos($html2,"Users Home"));
76
-		$this->assertGreaterThan(strlen($html1),strlen($html2));
73
+		$html2 = getClassicModuleTitle("users", Array('Users Home'), true);
74
+		$this->assertGreaterThan(0, strlen($html2));
75
+		$this->assertNotFalse(strpos($html2, "Users Home"));
76
+		$this->assertGreaterThan(strlen($html1), strlen($html2));
77 77
 		
78 78
 	}
79 79
 	
@@ -87,17 +87,17 @@  discard block
 block discarded – undo
87 87
 		insert_popup_header();
88 88
 		$renderedContent1 = ob_get_contents();
89 89
 		ob_end_clean();
90
-		$this->assertGreaterThan(0,strlen($renderedContent1));
90
+		$this->assertGreaterThan(0, strlen($renderedContent1));
91 91
 		
92 92
 		
93 93
 		//with includeJS false, generates less html
94 94
 		ob_start();
95
-		insert_popup_header('',false);
95
+		insert_popup_header('', false);
96 96
 		$renderedContent2 = ob_get_contents();
97 97
 		ob_end_clean();
98
-		$this->assertGreaterThan(0,strlen($renderedContent2));		
98
+		$this->assertGreaterThan(0, strlen($renderedContent2));		
99 99
 		
100
-		$this->assertGreaterThan(strlen($renderedContent2),strlen($renderedContent1));
100
+		$this->assertGreaterThan(strlen($renderedContent2), strlen($renderedContent1));
101 101
 		
102 102
 	}
103 103
 	
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		insert_popup_footer();
111 111
 		$renderedContent = ob_get_contents();
112 112
 		ob_end_clean();
113
-		$this->assertGreaterThan(0,strlen($renderedContent));
113
+		$this->assertGreaterThan(0, strlen($renderedContent));
114 114
 		
115 115
 	}
116 116
 
Please login to merge, or discard this patch.
tests/tests/include/utils/autoloaderTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 
4 4
 
5
-class SugarAutoLoaderTest extends PHPUnit_Framework_TestCase{
5
+class SugarAutoLoaderTest extends PHPUnit_Framework_TestCase {
6 6
 
7 7
 
8 8
     public function testautoload()
@@ -24,14 +24,14 @@  discard block
 block discarded – undo
24 24
 	}
25 25
 
26 26
 
27
-	public function testloadAll(){
27
+	public function testloadAll() {
28 28
 		
29 29
 		//execute the method and check if it works and doesn't throws an exception
30 30
 		//this method only includes file so there is no output to test.
31 31
 		try {
32 32
 			SugarAutoLoader::loadAll();
33 33
 			$this->assertTrue(TRUE);
34
-		} catch (Exception $e) {
34
+		}catch (Exception $e) {
35 35
 			$this->fail();
36 36
 		}
37 37
 		 
Please login to merge, or discard this patch.
tests/tests/include/utils/zipUtilsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
5 5
 {
6 6
 
7 7
 	
8
-	public function testunzip(){
8
+	public function testunzip() {
9 9
 		$this->markTestIncomplete('Can Not be implemented');
10 10
 	}
11 11
 	
12
-	public function testunzip_file(){
12
+	public function testunzip_file() {
13 13
 		$this->markTestIncomplete('Can Not be implemented');
14 14
 	}
15 15
 	
16
-	public function testzip_dir(){
16
+	public function testzip_dir() {
17 17
 		$this->markTestIncomplete('Can Not be implemented');
18 18
 	}
19 19
 	
Please login to merge, or discard this patch.
tests/tests/include/utils/activityUtilsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 		//with rel_users_table manually set
14 14
 		$bean = new User();
15 15
 		$bean->rel_users_table = "users_signatures";
16
-		$list = build_related_list_by_user_id($bean,'1','');
16
+		$list = build_related_list_by_user_id($bean, '1', '');
17 17
 		$this->assertTrue(is_array($list));
18 18
 
19 19
 		//with rel_users_table set by default 
20 20
 		$bean = new Meeting();
21
-		$list = build_related_list_by_user_id($bean,'1','');
21
+		$list = build_related_list_by_user_id($bean, '1', '');
22 22
 		$this->assertTrue(is_array($list));
23 23
 		
24 24
 	
Please login to merge, or discard this patch.
tests/tests/include/utils/progressBarUtilsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		//execute the method and test if it doesn't throw an exception.
25 25
 		//this method uses flush so we cannot get and verify content printed
26 26
 		try {
27
-			display_flow_bar("test",0);
27
+			display_flow_bar("test", 0);
28 28
 			$this->assertTrue(true);
29 29
 		}
30 30
 		catch (Exception $e) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		//execute the method and test if it doesn't throw an exception.
68 68
 		//this method uses flush so we cannot get and verify content printed
69 69
 		try {
70
-			display_progress_bar("test",80, 100);
70
+			display_progress_bar("test", 80, 100);
71 71
 			$this->assertTrue(true);
72 72
 		}
73 73
 		catch (Exception $e) {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 		//execute the method and test if it doesn't throw an exception.
82 82
 		//this method uses flush so we cannot get and verify content printed
83 83
 		try {
84
-			update_progress_bar("test",80, 100);
84
+			update_progress_bar("test", 80, 100);
85 85
 			$this->assertTrue(true);
86 86
 		}
87 87
 		catch (Exception $e) {
Please login to merge, or discard this patch.
tests/tests/include/utils/LogicHookTest.php 1 patch
Spacing   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	{
23 23
 		//execute the method and test if it returns correct class instances
24 24
 		$LogicHook = LogicHook::initialize();
25
-		$this->assertInstanceOf('LogicHook',$LogicHook);
25
+		$this->assertInstanceOf('LogicHook', $LogicHook);
26 26
 		
27 27
 	}
28 28
 
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 		
33 33
 		$LogicHook = new LogicHook();
34 34
 		$result = $LogicHook->setBean(new User());
35
-		$this->assertInstanceOf('LogicHook',$result);
36
-		$this->assertInstanceOf('User',$result->bean);		
35
+		$this->assertInstanceOf('LogicHook', $result);
36
+		$this->assertInstanceOf('User', $result->bean);		
37 37
 	}
38 38
 
39 39
 
@@ -63,48 +63,48 @@  discard block
 block discarded – undo
63 63
     	    	
64 64
     	//execute the method and test if it returns expected contents
65 65
     	
66
-    	$expected_hook_map = array (
66
+    	$expected_hook_map = array(
67 67
     			'before_save' =>
68
-    			array (
69
-    					array ( 'file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
68
+    			array(
69
+    					array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
70 70
     			),
71 71
     			'after_save' =>
72
-    			array (
73
-    					array ('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
74
-    					array ('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 1,),
75
-    					array ('file' => 'custom/modules/Accounts/logic_hooks.php','index' => 2,),
76
-  						array ('file' => 'custom/modules/Accounts/logic_hooks.php','index' => 3,),
72
+    			array(
73
+    					array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
74
+    					array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 1,),
75
+    					array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 2,),
76
+  						array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 3,),
77 77
     			),
78 78
     			'after_relationship_add' =>
79
-    			array (
80
-    					array ('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
79
+    			array(
80
+    					array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
81 81
     			),
82 82
     			'after_relationship_delete' =>
83
-    			array (
84
-						array ('file' => 'custom/modules/Accounts/logic_hooks.php','index' => 0,),
83
+    			array(
84
+						array('file' => 'custom/modules/Accounts/logic_hooks.php', 'index' => 0,),
85 85
     			),
86 86
     	);
87 87
     	
88 88
  
89
-    	$expected_hookscan = array (
89
+    	$expected_hookscan = array(
90 90
     			'before_save' =>
91
-    			array (
92
-    					array (77, 'updateGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateGeocodeInfo',),
91
+    			array(
92
+    					array(77, 'updateGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateGeocodeInfo',),
93 93
     			),
94 94
     			'after_save' =>
95
-    			array (
96
-    				    array (77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo',),
97
-    					array (78, 'updateRelatedProjectGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedProjectGeocodeInfo', ),
98
-    					array (79, 'updateRelatedOpportunitiesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedOpportunitiesGeocodeInfo',),
99
-    					array (80, 'updateRelatedCasesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedCasesGeocodeInfo',),
95
+    			array(
96
+    				    array(77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo',),
97
+    					array(78, 'updateRelatedProjectGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedProjectGeocodeInfo',),
98
+    					array(79, 'updateRelatedOpportunitiesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedOpportunitiesGeocodeInfo',),
99
+    					array(80, 'updateRelatedCasesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedCasesGeocodeInfo',),
100 100
     			),
101 101
     			'after_relationship_add' =>
102
-    			array (
103
-    					array ( 77, 'addRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'addRelationship',),
102
+    			array(
103
+    					array(77, 'addRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'addRelationship',),
104 104
     			),
105 105
     			'after_relationship_delete' =>
106
-    			array (
107
-    					array ( 77, 'deleteRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'deleteRelationship',),
106
+    			array(
107
+    					array(77, 'deleteRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'deleteRelationship',),
108 108
     			),
109 109
     	);
110 110
     	
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
     	$hookscan = $LogicHook->getHooksList();
115 115
     	
116 116
     	
117
-    	$this->assertSame($expected_hook_map,$hook_map);
118
-    	$this->assertSame($expected_hookscan,$hookscan);
117
+    	$this->assertSame($expected_hook_map, $hook_map);
118
+    	$this->assertSame($expected_hookscan, $hookscan);
119 119
     	
120 120
     	
121 121
     }
@@ -139,52 +139,52 @@  discard block
 block discarded – undo
139 139
 	{
140 140
 		//execute the method and test if it returns expected contents
141 141
 		
142
-		$expected_accounts = array (
143
-				'after_ui_frame' => Array (),
142
+		$expected_accounts = array(
143
+				'after_ui_frame' => Array(),
144 144
 				'before_save' =>
145
-				array (
146
-						array (77, 'updateGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateGeocodeInfo',),
145
+				array(
146
+						array(77, 'updateGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateGeocodeInfo',),
147 147
 				),
148 148
 				'after_save' =>
149
-				array (
150
-						array (77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo',),
151
-						array (78, 'updateRelatedProjectGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedProjectGeocodeInfo', ),
152
-						array (79, 'updateRelatedOpportunitiesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedOpportunitiesGeocodeInfo',),
153
-						array (80, 'updateRelatedCasesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedCasesGeocodeInfo',),
149
+				array(
150
+						array(77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo',),
151
+						array(78, 'updateRelatedProjectGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedProjectGeocodeInfo',),
152
+						array(79, 'updateRelatedOpportunitiesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedOpportunitiesGeocodeInfo',),
153
+						array(80, 'updateRelatedCasesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedCasesGeocodeInfo',),
154 154
 				),
155 155
 				'after_relationship_add' =>
156
-				array (
157
-						array ( 77, 'addRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'addRelationship',),
156
+				array(
157
+						array(77, 'addRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'addRelationship',),
158 158
 				),
159 159
 				'after_relationship_delete' =>
160
-				array (
161
-						array ( 77, 'deleteRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'deleteRelationship',),
160
+				array(
161
+						array(77, 'deleteRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'deleteRelationship',),
162 162
 				),
163 163
 		);
164 164
 		
165
-		$expected_default = array (
165
+		$expected_default = array(
166 166
 					'after_ui_footer' =>
167
-					array (
168
-							array (10,'popup_onload','modules/SecurityGroups/AssignGroups.php','AssignGroups','popup_onload',),
167
+					array(
168
+							array(10, 'popup_onload', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'popup_onload',),
169 169
 					),
170 170
 					'after_ui_frame' =>
171
-					array (
172
-							array (20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'mass_assign',),
173
-							array ( 1, 'Load Social JS', 'include/social/hooks.php', 'hooks', 'load_js',),
171
+					array(
172
+							array(20, 'mass_assign', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'mass_assign',),
173
+							array(1, 'Load Social JS', 'include/social/hooks.php', 'hooks', 'load_js',),
174 174
 					),
175 175
 					'after_save' =>
176
-					array (
177
-							array ( 30,'popup_select', 'modules/SecurityGroups/AssignGroups.php','AssignGroups','popup_select',),
178
-							array ( 1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleChanges',),
179
-							array ( 99, 'AOW_Workflow', 'modules/AOW_WorkFlow/AOW_WorkFlow.php', 'AOW_WorkFlow','run_bean_flows',),
176
+					array(
177
+							array(30, 'popup_select', 'modules/SecurityGroups/AssignGroups.php', 'AssignGroups', 'popup_select',),
178
+							array(1, 'AOD Index Changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleChanges',),
179
+							array(99, 'AOW_Workflow', 'modules/AOW_WorkFlow/AOW_WorkFlow.php', 'AOW_WorkFlow', 'run_bean_flows',),
180 180
 					),
181 181
 					'after_delete' =>
182
-					array (
183
-							array ( 1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks','saveModuleDelete',),
182
+					array(
183
+							array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleDelete',),
184 184
 					),
185 185
 					'after_restore' =>
186
-					array (
187
-							array ( 1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleRestore',),
186
+					array(
187
+							array(1, 'AOD Index changes', 'modules/AOD_Index/AOD_LogicHooks.php', 'AOD_LogicHooks', 'saveModuleRestore',),
188 188
 					),
189 189
 				);
190 190
 		
@@ -206,26 +206,26 @@  discard block
 block discarded – undo
206 206
 	{
207 207
 		//execute the method and test if it returns expected contents
208 208
 		
209
-		$expected = array (
210
-				'after_ui_frame' => Array (),
209
+		$expected = array(
210
+				'after_ui_frame' => Array(),
211 211
 				'before_save' =>
212
-				array (
213
-						array (77, 'updateGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateGeocodeInfo',),
212
+				array(
213
+						array(77, 'updateGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateGeocodeInfo',),
214 214
 				),
215 215
 				'after_save' =>
216
-				array (
217
-						array (77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo',),
218
-						array (78, 'updateRelatedProjectGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedProjectGeocodeInfo', ),
219
-						array (79, 'updateRelatedOpportunitiesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedOpportunitiesGeocodeInfo',),
220
-						array (80, 'updateRelatedCasesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedCasesGeocodeInfo',),
216
+				array(
217
+						array(77, 'updateRelatedMeetingsGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedMeetingsGeocodeInfo',),
218
+						array(78, 'updateRelatedProjectGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedProjectGeocodeInfo',),
219
+						array(79, 'updateRelatedOpportunitiesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedOpportunitiesGeocodeInfo',),
220
+						array(80, 'updateRelatedCasesGeocodeInfo', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'updateRelatedCasesGeocodeInfo',),
221 221
 				),
222 222
 				'after_relationship_add' =>
223
-				array (
224
-						array ( 77, 'addRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'addRelationship',),
223
+				array(
224
+						array(77, 'addRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'addRelationship',),
225 225
 				),
226 226
 				'after_relationship_delete' =>
227
-				array (
228
-						array ( 77, 'deleteRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'deleteRelationship',),
227
+				array(
228
+						array(77, 'deleteRelationship', 'modules/Accounts/AccountsJjwg_MapsLogicHook.php', 'AccountsJjwg_MapsLogicHook', 'deleteRelationship',),
229 229
 				),
230 230
 		);
231 231
 		
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 		$this->assertSame($expected, $hooks);
237 237
 		
238 238
 		//test wit hrefresh true
239
-		$hooks = $LogicHook->getHooks('Accounts',true);
239
+		$hooks = $LogicHook->getHooks('Accounts', true);
240 240
 		$this->assertSame($expected, $hooks);
241 241
 		
242 242
 		
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 		$hooks = $LogicHook->loadHooks('');
272 272
 		
273 273
 		try {
274
-			$LogicHook->process_hooks($hooks, 'after_ui_footer',array() );
274
+			$LogicHook->process_hooks($hooks, 'after_ui_footer', array());
275 275
 			$this->assertTrue(true);
276 276
 		}
277 277
 		catch (Exception $e) {
Please login to merge, or discard this patch.