@@ -7,9 +7,9 @@ discard block |
||
7 | 7 | |
8 | 8 | //execute the contructor and check for the Object type and attributes |
9 | 9 | $employee = new Employee(); |
10 | - $this->assertInstanceOf('Employee',$employee); |
|
11 | - $this->assertInstanceOf('Person',$employee); |
|
12 | - $this->assertInstanceOf('SugarBean',$employee); |
|
10 | + $this->assertInstanceOf('Employee', $employee); |
|
11 | + $this->assertInstanceOf('Person', $employee); |
|
12 | + $this->assertInstanceOf('SugarBean', $employee); |
|
13 | 13 | |
14 | 14 | $this->assertAttributeEquals('Employees', 'module_dir', $employee); |
15 | 15 | $this->assertAttributeEquals('Employee', 'object_name', $employee); |
@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | $employee = new Employee(); |
27 | 27 | |
28 | 28 | //test without setting name |
29 | - $this->assertEquals(' ',$employee->get_summary_text()); |
|
29 | + $this->assertEquals(' ', $employee->get_summary_text()); |
|
30 | 30 | |
31 | 31 | //test with name set |
32 | 32 | $employee->retrieve(1); |
33 | - $this->assertEquals('Administrator',$employee->get_summary_text()); |
|
33 | + $this->assertEquals('Administrator', $employee->get_summary_text()); |
|
34 | 34 | |
35 | 35 | } |
36 | 36 | |
@@ -80,15 +80,15 @@ discard block |
||
80 | 80 | public function testverify_data() |
81 | 81 | { |
82 | 82 | $employee = new Employee(); |
83 | - $this->assertEquals(true ,$employee->verify_data() ); |
|
83 | + $this->assertEquals(true, $employee->verify_data()); |
|
84 | 84 | |
85 | 85 | } |
86 | 86 | |
87 | - public function testget_list_view_data(){ |
|
87 | + public function testget_list_view_data() { |
|
88 | 88 | |
89 | 89 | $employee = new Employee(); |
90 | 90 | |
91 | - $expected = array ( |
|
91 | + $expected = array( |
|
92 | 92 | 'SUGAR_LOGIN' => '1', |
93 | 93 | 'FULL_NAME' => ' ', |
94 | 94 | 'NAME' => ' ', |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | } |
112 | 112 | |
113 | - public function testlist_view_parse_additional_sections(){ |
|
113 | + public function testlist_view_parse_additional_sections() { |
|
114 | 114 | |
115 | 115 | $employee = new Employee(); |
116 | 116 | |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | |
133 | 133 | //test with empty string params |
134 | 134 | $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.deleted = 0 ORDER BY users.user_name"; |
135 | - $actual = $employee->create_export_query('',''); |
|
136 | - $this->assertSame($expected,$actual); |
|
135 | + $actual = $employee->create_export_query('', ''); |
|
136 | + $this->assertSame($expected, $actual); |
|
137 | 137 | |
138 | 138 | |
139 | 139 | //test with valid string params |
140 | 140 | $expected = "SELECT id, user_name, first_name, last_name, description, date_entered, date_modified, modified_user_id, created_by, title, department, is_admin, phone_home, phone_mobile, phone_work, phone_other, phone_fax, address_street, address_city, address_state, address_postalcode, address_country, reports_to_id, portal_only, status, receive_notifications, employee_status, messenger_id, messenger_type, is_group FROM users WHERE users.user_name=\"\" AND users.deleted = 0 ORDER BY users.id"; |
141 | - $actual = $employee->create_export_query('users.id','users.user_name=""'); |
|
142 | - $this->assertSame($expected,$actual); |
|
141 | + $actual = $employee->create_export_query('users.id', 'users.user_name=""'); |
|
142 | + $this->assertSame($expected, $actual); |
|
143 | 143 | |
144 | 144 | } |
145 | 145 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | { |
154 | 154 | $employee->preprocess_fields_on_save(); |
155 | 155 | $this->assertTrue(TRUE); |
156 | - } catch(Exception $e) |
|
156 | + }catch (Exception $e) |
|
157 | 157 | { |
158 | 158 | $this->fail(); |
159 | 159 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | { |
188 | 188 | $employee = new Employee(); |
189 | 189 | $result = $employee->hasCustomFields(); |
190 | - $this->assertEquals(false,$result); |
|
190 | + $this->assertEquals(false, $result); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | } |