@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,7 +58,9 @@ discard block |
||
| 56 | 58 | |
| 57 | 59 | parent::__construct($id, $def); |
| 58 | 60 | |
| 59 | - if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'mkt_dyntest'); |
|
| 61 | + if(empty($def['title'])) { |
|
| 62 | + $this->title = translate('LBL_HOMEPAGE_TITLE', 'mkt_dyntest'); |
|
| 63 | + } |
|
| 60 | 64 | |
| 61 | 65 | $this->searchFields = $dashletData['mkt_dyntestDashlet']['searchFields']; |
| 62 | 66 | $this->columns = $dashletData['mkt_dyntestDashlet']['columns']; |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -1,5 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
| 2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
| 3 | + die('Not A Valid Entry Point'); |
|
| 4 | +} |
|
| 3 | 5 | /********************************************************************************* |
| 4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
| 5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | //execute the method and test if it works and does not throws an exception. |
| 50 | 50 | try { |
| 51 | 51 | $SugarApplication->ACLFilter(); |
| 52 | - } |
|
| 53 | - catch (Exception $e) { |
|
| 52 | + } catch (Exception $e) { |
|
| 54 | 53 | $this->fail(); |
| 55 | 54 | } |
| 56 | 55 | |
@@ -67,16 +66,14 @@ discard block |
||
| 67 | 66 | //execute the method with invalid input and test if it works and does not throws an exception. |
| 68 | 67 | try { |
| 69 | 68 | $SugarApplication->setupResourceManagement(''); |
| 70 | - } |
|
| 71 | - catch (Exception $e) { |
|
| 69 | + } catch (Exception $e) { |
|
| 72 | 70 | $this->fail(); |
| 73 | 71 | } |
| 74 | 72 | |
| 75 | 73 | //execute the method with valid input and test if it works and does not throws an exception. |
| 76 | 74 | try { |
| 77 | 75 | $SugarApplication->setupResourceManagement('Users'); |
| 78 | - } |
|
| 79 | - catch (Exception $e) { |
|
| 76 | + } catch (Exception $e) { |
|
| 80 | 77 | $this->fail(); |
| 81 | 78 | } |
| 82 | 79 | |
@@ -91,8 +88,7 @@ discard block |
||
| 91 | 88 | //execute the method and test if it works and does not throws an exception. |
| 92 | 89 | try { |
| 93 | 90 | $SugarApplication->setupPrint(); |
| 94 | - } |
|
| 95 | - catch (Exception $e) { |
|
| 91 | + } catch (Exception $e) { |
|
| 96 | 92 | $this->fail(); |
| 97 | 93 | } |
| 98 | 94 | |
@@ -108,8 +104,7 @@ discard block |
||
| 108 | 104 | //execute the method and test if it works and does not throws an exception. |
| 109 | 105 | try { |
| 110 | 106 | $SugarApplication->preProcess(); |
| 111 | - } |
|
| 112 | - catch (Exception $e) { |
|
| 107 | + } catch (Exception $e) { |
|
| 113 | 108 | $this->fail(); |
| 114 | 109 | } |
| 115 | 110 | |
@@ -124,8 +119,7 @@ discard block |
||
| 124 | 119 | //execute the method and test if it works and does not throws an exception. |
| 125 | 120 | try { |
| 126 | 121 | $SugarApplication->handleOfflineClient(); |
| 127 | - } |
|
| 128 | - catch (Exception $e) { |
|
| 122 | + } catch (Exception $e) { |
|
| 129 | 123 | $this->fail(); |
| 130 | 124 | } |
| 131 | 125 | |
@@ -160,8 +154,7 @@ discard block |
||
| 160 | 154 | //check that method call got the app_strings global variable set. |
| 161 | 155 | $this->assertTrue(is_array($GLOBALS['app_strings']) && count($GLOBALS['app_strings']) > 0 ); |
| 162 | 156 | |
| 163 | - } |
|
| 164 | - catch (Exception $e) { |
|
| 157 | + } catch (Exception $e) { |
|
| 165 | 158 | $this->fail(); |
| 166 | 159 | } |
| 167 | 160 | |
@@ -187,8 +180,7 @@ discard block |
||
| 187 | 180 | //check that method call got the mod_strings global variable set. |
| 188 | 181 | $this->assertTrue(is_array($GLOBALS['mod_strings']) && count($GLOBALS['mod_strings']) > 0 ); |
| 189 | 182 | |
| 190 | - } |
|
| 191 | - catch (Exception $e) { |
|
| 183 | + } catch (Exception $e) { |
|
| 192 | 184 | $this->fail(); |
| 193 | 185 | } |
| 194 | 186 | |
@@ -215,8 +207,7 @@ discard block |
||
| 215 | 207 | //execute the method and test if it works and does not throws an exception. |
| 216 | 208 | try { |
| 217 | 209 | $SugarApplication->loadDisplaySettings(); |
| 218 | - } |
|
| 219 | - catch (Exception $e) { |
|
| 210 | + } catch (Exception $e) { |
|
| 220 | 211 | $this->fail(); |
| 221 | 212 | } |
| 222 | 213 | |
@@ -232,8 +223,7 @@ discard block |
||
| 232 | 223 | try { |
| 233 | 224 | $SugarApplication->loadLicense(); |
| 234 | 225 | |
| 235 | - } |
|
| 236 | - catch (Exception $e) { |
|
| 226 | + } catch (Exception $e) { |
|
| 237 | 227 | $this->fail(); |
| 238 | 228 | } |
| 239 | 229 | |
@@ -250,8 +240,7 @@ discard block |
||
| 250 | 240 | try { |
| 251 | 241 | $SugarApplication->loadGlobals(); |
| 252 | 242 | |
| 253 | - } |
|
| 254 | - catch (Exception $e) { |
|
| 243 | + } catch (Exception $e) { |
|
| 255 | 244 | $this->fail(); |
| 256 | 245 | } |
| 257 | 246 | |
@@ -268,8 +257,7 @@ discard block |
||
| 268 | 257 | //execute the method and test if it works and does not throws an exception. |
| 269 | 258 | try { |
| 270 | 259 | $SugarApplication->startSession(); |
| 271 | - } |
|
| 272 | - catch (Exception $e) { |
|
| 260 | + } catch (Exception $e) { |
|
| 273 | 261 | $this->fail(); |
| 274 | 262 | } |
| 275 | 263 | |
@@ -288,8 +276,7 @@ discard block |
||
| 288 | 276 | //execute the method and test if it works and does not throws an exception. |
| 289 | 277 | try { |
| 290 | 278 | $SugarApplication->endSession(); |
| 291 | - } |
|
| 292 | - catch (Exception $e) { |
|
| 279 | + } catch (Exception $e) { |
|
| 293 | 280 | $this->fail(); |
| 294 | 281 | } |
| 295 | 282 | |
@@ -357,8 +344,7 @@ discard block |
||
| 357 | 344 | //execute the method and test if it works and does not throws an exception. |
| 358 | 345 | try { |
| 359 | 346 | $vars = $SugarApplication->createLoginVars(); |
| 360 | - } |
|
| 361 | - catch (Exception $e) { |
|
| 347 | + } catch (Exception $e) { |
|
| 362 | 348 | $this->fail(); |
| 363 | 349 | } |
| 364 | 350 | |
@@ -39,8 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | try{ |
| 41 | 41 | $view->bean = new Account(); |
| 42 | - } |
|
| 43 | - Catch(Exception $e){ |
|
| 42 | + } Catch(Exception $e){ |
|
| 44 | 43 | $this->assertStringStartsWith('mysqli_query()',$e->getMessage()); |
| 45 | 44 | } |
| 46 | 45 | |
@@ -56,8 +55,7 @@ discard block |
||
| 56 | 55 | $this->assertGreaterThan(0,strlen($renderedContent)); |
| 57 | 56 | $this->assertNotEquals(False,json_decode($renderedContent)); |
| 58 | 57 | |
| 59 | - } |
|
| 60 | - Catch(Exception $e){ |
|
| 58 | + } Catch(Exception $e){ |
|
| 61 | 59 | $this->assertStringStartsWith('mysqli_query()',$e->getMessage()); |
| 62 | 60 | } |
| 63 | 61 | |
@@ -24,8 +24,7 @@ |
||
| 24 | 24 | |
| 25 | 25 | try{ |
| 26 | 26 | $view->bean = new Account(); |
| 27 | - } |
|
| 28 | - Catch(Exception $e){ |
|
| 27 | + } Catch(Exception $e){ |
|
| 29 | 28 | $this->assertStringStartsWith('mysqli_query()',$e->getMessage()); |
| 30 | 29 | } |
| 31 | 30 | |