Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.
 All Data Structures Functions Variables Pages
ContactMergeTagsUtilTest.php
1 <?php
2  /*********************************************************************************
3  * Zurmo is a customer relationship management program developed by
4  * Zurmo, Inc. Copyright (C) 2017 Zurmo Inc.
5  *
6  * Zurmo is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License version 3 as published by the
8  * Free Software Foundation with the addition of the following permission added
9  * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
10  * IN WHICH THE COPYRIGHT IS OWNED BY ZURMO, ZURMO DISCLAIMS THE WARRANTY
11  * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
12  *
13  * Zurmo is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Affero General Public License along with
19  * this program; if not, see http://www.gnu.org/licenses or write to the Free
20  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  * 02110-1301 USA.
22  *
23  * You can contact Zurmo, Inc. with a mailing address at 27 North Wacker Drive
24  * Suite 370 Chicago, IL 60606. or at email address contact@zurmo.com.
25  *
26  * The interactive user interfaces in original and modified versions
27  * of this program must display Appropriate Legal Notices, as required under
28  * Section 5 of the GNU Affero General Public License version 3.
29  *
30  * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
31  * these Appropriate Legal Notices must retain the display of the Zurmo
32  * logo and Zurmo copyright notice. If the display of the logo is not reasonably
33  * feasible for technical reasons, the Appropriate Legal Notices must display the words
34  * "Copyright Zurmo Inc. 2017. All rights reserved".
35  ********************************************************************************/
37  {
38  protected static $emailTemplate;
39 
40  protected static $super;
41 
42  protected static $compareContent;
43 
44  protected static $content;
45 
46  protected static $account;
47 
48  protected static $contact;
49 
50  protected static $lead;
51 
52  protected $invalidTags;
53 
54  protected $mergeTagsUtil;
55 
56  protected static $hash;
57 
58  public static function setUpBeforeClass()
59  {
60  parent::setUpBeforeClass();
61  SecurityTestHelper::createSuperAdmin();
62  SecurityTestHelper::createUsers();
63  self::$super = User::getByUsername('super');
64  Yii::app()->user->userModel = self::$super;
66  if (!$loaded)
67  {
68  throw new NotSupportedException();
69  }
70  $emailSignature = new EmailSignature();
71  $emailSignature->htmlContent = 'my email signature';
72  self::$super->emailSignatures->add($emailSignature);
73  self::$super->save();
74 
75  $currencies = Currency::getAll();
76  $currencyValue = new CurrencyValue();
77  $currencyValue->value = 100;
78  $currencyValue->currency = $currencies[0];
79 
80  $multiDropDownCustomFieldData = new CustomFieldData();
81  $multiDropDownCustomFieldData->name = 'multiDropDown';
82  $multiDropDownCustomFieldData->serializedData = serialize(array('Ten', 11, 'XII'));
83  $saved = $multiDropDownCustomFieldData->save();
84  assert('$saved'); // Not Coding Standard
85 
86  $multiDropDownCustomFieldValue1 = new CustomFieldValue();
87  $multiDropDownCustomFieldValue1->value = 'Ten';
88  $multiDropDownCustomFieldValue2 = new CustomFieldValue();
89  $multiDropDownCustomFieldValue2->value = 11;
90  $multiDropDownCustomFieldValue3 = new CustomFieldValue();
91  $multiDropDownCustomFieldValue3->value = 'XII';
92 
93  $tagCustomFieldData = new CustomFieldData();
94  $tagCustomFieldData->name = 'tagCloud';
95  $tagCustomFieldData->serializedData = serialize(array('Apache', 'PHP'));
96  $saved = $tagCustomFieldData->save();
97  assert('$saved'); // Not Coding Standard
98 
99  $tagCustomFieldValue1 = new CustomFieldValue();
100  $tagCustomFieldValue1->value = 'PHP';
101  $tagCustomFieldValue2 = new CustomFieldValue();
102  $tagCustomFieldValue2->value = 'Apache';
103 
104  $primaryEmail = new Email();
105  $primaryEmail->emailAddress = "info@zurmo.com";
106  $primaryEmail->isInvalid = true;
107  $primaryEmail->optOut = false;
108 
109  $secondaryEmail = new Email();
110  $secondaryEmail->emailAddress = "jake@zurmo.com";
111  $secondaryEmail->isInvalid = false;
112  $secondaryEmail->optOut = true;
113 
114  $address = new Address();
115  $address->street1 = "SomeStreet1";
116  $address->street2 = "SomeStreet2";
117  $address->city = "SomeCity";
118  $address->state = "SomeState";
119  $address->postalCode = 1111;
120  $address->country = "SomeCountry";
121 
122  $likeContactState = new ContactState();
123  $likeContactState->name = 'Customer';
124  $likeContactState->order = 0;
125 
126  static::$hash = StringUtil::generateRandomString(60);
127  $users = User::getAll();
128  $user = new User();
129  $user->lastName = 'Kevin';
130  $user->hash = static::$hash;
131  $user->language = 'es';
132  $user->timeZone = 'America/Chicago';
133  $user->username = 'kevinjones';
134  $user->currency = $currencies[0];
135  $user->manager = $users[0];
136 
137  //Custom attribute
138  $attributeForm = new TextAttributeForm();
139  $attributeForm->attributeName = 'custom';
140  $attributeForm->attributeLabels = array('en' => 'test label en');
141 
142  $modelAttributesAdapterClassName = $attributeForm::
143  getModelAttributeAdapterNameForSavingAttributeFormData();
144  $adapter = new $modelAttributesAdapterClassName(new EmailTemplateModelTestItem());
145  $adapter->setAttributeMetadataFromForm($attributeForm);
146 
147  //Custom attribute with underscore and number
148  $attributeForm = new TextAttributeForm();
149  $attributeForm->attributeName = 'custom_attr_2';
150  $attributeForm->attributeLabels = array('en' => 'custom test label en');
151 
152  $modelAttributesAdapterClassName = $attributeForm::
153  getModelAttributeAdapterNameForSavingAttributeFormData();
154  $adapter = new $modelAttributesAdapterClassName(new EmailTemplateModelTestItem());
155  $adapter->setAttributeMetadataFromForm($attributeForm);
156 
157  $model = new EmailTemplateModelTestItem();
158  $model->string = 'We will add a $100 discount to this deal';
159  $model->firstName = 'James';
160  $model->lastName = 'Jackson';
161  $model->phone = 1122334455;
162  $model->boolean = true;
163  $model->date = '2008-12-31';
164  $model->dateTime = '2008-12-31 07:48:04';
165  $model->textArea = 'Multiple Lines\nOf Text';
166  $model->url = 'http://www.zurmo.com/';
167  $model->integer = 999;
168  $model->float = 999.999;
169  $model->currencyValue = $currencyValue;
170  $model->dropDown->value = "DropdownSelectedValue";
171  $model->radioDropDown->value = "RadioDropdownSelectedValue";
172  $model->primaryEmail = $primaryEmail;
173  $model->secondaryEmail = $secondaryEmail;
174  $model->primaryAddress = $address;
175  $model->likeContactState = $likeContactState;
176  $model->user = $user;
177  $model->multiDropDown->data = $multiDropDownCustomFieldData;
178  $model->tagCloud->data = $tagCustomFieldData;
179  $model->multiDropDown->values->add($multiDropDownCustomFieldValue1);
180  $model->multiDropDown->values->add($multiDropDownCustomFieldValue2);
181  $model->multiDropDown->values->add($multiDropDownCustomFieldValue3);
182  $model->tagCloud->values->add($tagCustomFieldValue1);
183  $model->tagCloud->values->add($tagCustomFieldValue2);
184  $model->customCstm = 'text custom';
185  $model->custom_attr_2Cstm = 'text custom 2';
186  $saved = $model->save();
187  assert('$saved'); // Not Coding Standard
188  self::$emailTemplate = $model;
189  self::$content = '[[STRING]] [[FIRST^NAME]] [[LAST^NAME]] [[PHONE]]';
190  self::$compareContent = 'We will add a $100 discount to this deal' .
191  ' James Jackson 1122334455';
192 
193  self::$account = AccountTestHelper::
194  createAccountByNameForOwner('Account1', self::$super);
195  self::$account->billingAddress = new Address();
196  self::$account->billingAddress->street1 = 'AccountStreet1';
197  $saved = self::$account->save();
198  if (!$saved)
199  {
200  throw new FailedToSaveModelException();
201  }
202  self::$contact = ContactTestHelper::
203  createContactWithAccountByNameForOwner('Jason',
204  self::$super, self::$account);
205  self::$lead = LeadTestHelper::
206  createLeadByNameForOwner('Laura', self::$super);
207  }
208 
209  public static function getDependentTestModelClassNames()
210  {
211  return array('EmailTemplateModelTestItem');
212  }
213 
214  public function setUp()
215  {
216  parent::setUp();
217  Yii::app()->user->userModel = self::$super;
218  $this->mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, self::$content);
219  $this->invalidTags = array();
220  }
221 
222  public function testCanInstantiateContactMergeTags()
223  {
224  $this->assertTrue($this->mergeTagsUtil instanceof MergeTagsUtil);
225  $this->assertTrue($this->mergeTagsUtil instanceof ContactMergeTagsUtil);
226  }
227 
232  {
233  $resolvedContent = $this->mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, 'fr');
234  $this->assertTrue($resolvedContent !== false);
235  $this->assertNotEquals($resolvedContent, self::$content);
236  $this->assertEquals($resolvedContent, self::$compareContent);
237  $this->assertEmpty($this->invalidTags);
238  }
239 
244  {
245  $resolvedContent = $this->mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null);
246  $this->assertTrue($resolvedContent !== false);
247  $this->assertNotEquals($resolvedContent, self::$content);
248  $this->assertEquals($resolvedContent, self::$compareContent);
249  $this->assertEmpty($this->invalidTags);
250  }
251 
256  {
257  $resolvedContent = $this->mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
258  $this->assertTrue($resolvedContent !== false);
259  $this->assertNotEquals($resolvedContent, self::$content);
260  $this->assertEquals($resolvedContent, self::$compareContent);
261  $this->assertEmpty($this->invalidTags);
262  }
263 
268  {
269  $content = "This is some text that doesn't contain any merge tags";
270  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
271  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
272  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
273  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null);
274  $this->assertTrue($resolvedContent !== false);
275  $this->assertEquals($resolvedContent, $content);
276  $this->assertEmpty($this->invalidTags);
277  }
278 
282  public function testFailsOnInvalidMergeTags()
283  {
284  $content = "This is some text that has [[INVALID]] [[IN^VALID]] [[PHONE__NO]] merge tags";
285  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
286  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
287  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
288  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null);
289  $this->assertFalse($resolvedContent);
290  $this->assertNotEquals($resolvedContent, $content);
291  $this->assertNotEmpty($this->invalidTags);
292  $this->assertEquals(3, count($this->invalidTags));
293  $this->assertTrue($this->invalidTags[0] == 'INVALID');
294  $this->assertTrue($this->invalidTags[1] == 'IN^VALID');
295  $this->assertTrue($this->invalidTags[2] == 'PHONE__NO');
296  }
297 
302  {
303  $content = "This is some text that has [[INVALID]] [[IN^VALID]] [[PHONE__NO]] merge tags";
304  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
305  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
306  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
307  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null,
308  MergeTagsToModelAttributesAdapter::ERROR_ON_FIRST_INVALID_TAG);
309  $this->assertFalse($resolvedContent);
310  $this->assertNotEquals($resolvedContent, $content);
311  $this->assertEmpty($this->invalidTags);
312  }
313 
318  {
319  $content = "This is some text that has [[INVALID]] [[IN^VALID]] [[PHONE__NO]] merge tags";
320  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
321  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
322  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
323  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null,
324  MergeTagsToModelAttributesAdapter::DO_NOT_ERROR_ON_FIRST_INVALID_TAG);
325  $this->assertFalse($resolvedContent);
326  $this->assertNotEquals($resolvedContent, $content);
327  $this->assertNotEmpty($this->invalidTags);
328  }
329 
334  {
335  $content = "This is some text that has [[INVALID]] [[IN^VALID]] [[STRING]] merge tags";
336  $compareContent = "This is some text that has We will add a $100 discount to this deal merge tags";
337  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
338  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
339  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
340  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null,
341  MergeTagsToModelAttributesAdapter::SUPPRESS_INVALID_TAG_ERRORS_REPLACE_WITH_EMPTY);
342  $this->assertTrue($resolvedContent !== false);
343  $this->assertNotEquals($resolvedContent, $content);
344  $this->assertEquals($compareContent, $resolvedContent);
345  $this->assertNotEmpty($this->invalidTags);
346  $this->assertEquals(array("INVALID", "IN^VALID"), $this->invalidTags);
347  }
348 
353  {
354  $content = "This is some text that has [[INVALID]] [[IN^VALID]] [[STRING]] merge tags";
355  $compareContent = "This is some text that has [[INVALID]] [[IN^VALID]] We will add a $100 discount to this deal merge tags";
356  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
357  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
358  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
359  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags, null,
360  MergeTagsToModelAttributesAdapter::SUPPRESS_INVALID_TAG_ERRORS_KEEP_TAG);
361  $this->assertTrue($resolvedContent !== false);
362  $this->assertNotEquals($resolvedContent, $content);
363  $this->assertEquals($compareContent, $resolvedContent);
364  $this->assertNotEmpty($this->invalidTags);
365  $this->assertEquals(array("INVALID", "IN^VALID"), $this->invalidTags);
366  }
367 
368  // TODO: @Shoaibi/@Jason: Low: All of the tests below would have to be duplicated for different languages.
369 
373  public function testStringMergeTag()
374  {
375  $content = 'string: [[STRING]]';
376  $compareContent = 'string: We will add a $100 discount to this deal';
377  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
378  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
379  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
380  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
381  $this->assertTrue($resolvedContent !== false);
382  $this->assertNotEquals($resolvedContent, $content);
383  $this->assertEquals($compareContent, $resolvedContent);
384  $this->assertEmpty($this->invalidTags);
385  }
386 
390  public function testFirstNameMergeTag()
391  {
392  $content = 'firstName: [[FIRST^NAME]]';
393  $compareContent = 'firstName: James';
394  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
395  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
396  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
397  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
398  $this->assertTrue($resolvedContent !== false);
399  $this->assertNotEquals($resolvedContent, $content);
400  $this->assertEquals($compareContent, $resolvedContent);
401  $this->assertEmpty($this->invalidTags);
402  }
403 
407  public function testLastNameMergeTag()
408  {
409  $content = 'lastName: [[LAST^NAME]]';
410  $compareContent = 'lastName: Jackson';
411  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
412  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
413  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
414  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
415  $this->assertTrue($resolvedContent !== false);
416  $this->assertNotEquals($resolvedContent, $content);
417  $this->assertEquals($compareContent, $resolvedContent);
418  $this->assertEmpty($this->invalidTags);
419  }
420 
424  public function testPhoneMergeTag()
425  {
426  $content = 'phone: [[PHONE]]';
427  $compareContent = 'phone: 1122334455';
428  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
429  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
430  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
431  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
432  $this->assertTrue($resolvedContent !== false);
433  $this->assertNotEquals($resolvedContent, $content);
434  $this->assertEquals($compareContent, $resolvedContent);
435  $this->assertEmpty($this->invalidTags);
436  }
437 
441  public function testBooleanMergeTag()
442  {
443  $content = 'boolean: [[BOOLEAN]]';
444  $compareContent = 'boolean: 1';
445  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
446  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
447  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
448  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
449  $this->assertTrue($resolvedContent !== false);
450  $this->assertNotEquals($resolvedContent, $content);
451  $this->assertEquals($compareContent, $resolvedContent);
452  $this->assertEmpty($this->invalidTags);
453  }
454 
458  public function testDateMergeTag()
459  {
460  $content = 'date: [[DATE]]';
461  $compareContent = 'date: 2008-12-31';
462  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
463  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
464  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
465  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
466  $this->assertTrue($resolvedContent !== false);
467  $this->assertNotEquals($resolvedContent, $content);
468  $this->assertEquals($compareContent, $resolvedContent);
469  $this->assertEmpty($this->invalidTags);
470  }
471 
475  public function testDateTimeMergeTag()
476  {
477  $content = 'dateTime: [[DATE^TIME]]';
478  $compareContent = 'dateTime: 2008-12-31 07:48:04 GMT';
479  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
480  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
481  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
482  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
483  $this->assertTrue($resolvedContent !== false);
484  $this->assertNotEquals($resolvedContent, $content);
485  $this->assertEquals($compareContent, $resolvedContent);
486  $this->assertEmpty($this->invalidTags);
487  }
488 
492  public function testTextAreaMergeTag()
493  {
494  $content = 'textArea: [[TEXT^AREA]]';
495  $compareContent = 'textArea: Multiple Lines\nOf Text';
496  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
497  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
498  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
499  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
500  $this->assertTrue($resolvedContent !== false);
501  $this->assertNotEquals($resolvedContent, $content);
502  $this->assertEquals($compareContent, $resolvedContent);
503  $this->assertEmpty($this->invalidTags);
504  }
505 
509  public function testUrlMergeTag()
510  {
511  $content = 'url: [[URL]]';
512  $compareContent = 'url: http://www.zurmo.com/';
513  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
514  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
515  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
516  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
517  $this->assertTrue($resolvedContent !== false);
518  $this->assertNotEquals($resolvedContent, $content);
519  $this->assertEquals($compareContent, $resolvedContent);
520  $this->assertEmpty($this->invalidTags);
521  }
522 
526  public function testIntegerMergeTag()
527  {
528  $content = 'integer: [[INTEGER]]';
529  $compareContent = 'integer: 999';
530  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
531  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
532  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
533  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
534  $this->assertTrue($resolvedContent !== false);
535  $this->assertNotEquals($resolvedContent, $content);
536  $this->assertEquals($compareContent, $resolvedContent);
537  $this->assertEmpty($this->invalidTags);
538  }
539 
543  public function testFloatMergeTag()
544  {
545  $content = 'float: [[FLOAT]]';
546  $compareContent = 'float: 999.999';
547  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
548  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
549  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
550  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
551  $this->assertTrue($resolvedContent !== false);
552  $this->assertNotEquals($resolvedContent, $content);
553  $this->assertEquals($compareContent, $resolvedContent);
554  $this->assertEmpty($this->invalidTags);
555  }
556 
560  public function testCurrencyValueMergeTag()
561  {
562  $content = 'currencyValue: [[CURRENCY^VALUE]] [[CURRENCY^VALUE__VALUE]] ' .
563  '[[CURRENCY^VALUE__CURRENCY__CODE]] [[CURRENCY^VALUE__CURRENCY__ACTIVE]]';
564  $compareContent = 'currencyValue: $100 100 USD 1';
565  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
566  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
567  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
568  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
569  $this->assertTrue($resolvedContent !== false);
570  $this->assertNotEquals($resolvedContent, $content);
571  $this->assertEquals($compareContent, $resolvedContent);
572  $this->assertEmpty($this->invalidTags);
573  }
574 
578  public function testDropDownMergeTag()
579  {
580  $content = 'dropDown: [[DROP^DOWN]] [[DROP^DOWN__VALUE]]';
581  $compareContent = 'dropDown: DropdownSelectedValue DropdownSelectedValue';
582  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
583  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
584  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
585  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
586  $this->assertTrue($resolvedContent !== false);
587  $this->assertNotEquals($resolvedContent, $content);
588  $this->assertEquals($compareContent, $resolvedContent);
589  $this->assertEmpty($this->invalidTags);
590  }
591 
595  public function testRadioDropDownMergeTag()
596  {
597  $content = 'radioDropDown: [[RADIO^DROP^DOWN]] [[RADIO^DROP^DOWN__VALUE]]';
598  $compareContent = 'radioDropDown: RadioDropdownSelectedValue RadioDropdownSelectedValue';
599  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
600  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
601  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
602  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
603  $this->assertTrue($resolvedContent !== false);
604  $this->assertNotEquals($resolvedContent, $content);
605  $this->assertEquals($compareContent, $resolvedContent);
606  $this->assertEmpty($this->invalidTags);
607  }
608 
612  public function testMultiDropDownMergeTag()
613  {
614  $content = 'multiDropDown: [[MULTI^DROP^DOWN]] [[MULTI^DROP^DOWN__VALUES]]';
615  $compareContent = 'multiDropDown: Ten, 11, XII 3 records.';
616  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
617  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
618  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
619  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
620  $this->assertTrue($resolvedContent !== false);
621  $this->assertNotEquals($resolvedContent, $content);
622  $this->assertEquals($compareContent, $resolvedContent);
623  $this->assertEmpty($this->invalidTags);
624  }
625 
629  public function testTagCloudMergeTag()
630  {
631  $content = 'tagCloud: [[TAG^CLOUD]] [[TAG^CLOUD__VALUES]]';
632  $compareContent = 'tagCloud: PHP, Apache 2 records.';
633  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
634  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
635  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
636  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
637  $this->assertTrue($resolvedContent !== false);
638  $this->assertNotEquals($resolvedContent, $content);
639  $this->assertEquals($compareContent, $resolvedContent);
640  $this->assertEmpty($this->invalidTags);
641  }
642 
646  public function testPrimaryEmailMergeTag()
647  {
648  $content = 'primaryEmail: [[PRIMARY^EMAIL]] [[PRIMARY^EMAIL__EMAIL^ADDRESS]] ' .
649  '[[PRIMARY^EMAIL__IS^INVALID]] [[PRIMARY^EMAIL__OPT^OUT]]';
650  $compareContent = 'primaryEmail: info@zurmo.com info@zurmo.com 1 0';
651  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
652  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
653  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
654  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
655  $this->assertTrue($resolvedContent !== false);
656  $this->assertNotEquals($resolvedContent, $content);
657  $this->assertEquals($compareContent, $resolvedContent);
658  $this->assertEmpty($this->invalidTags);
659  }
660 
664  public function testOwnerEmailMergeTag()
665  {
666  $content = 'owner: [[OWNER]]';
667  $compareContent = 'owner: Clark Kent';
668  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
669  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
670  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
671  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
672  $this->assertTrue($resolvedContent !== false);
673  $this->assertNotEquals($resolvedContent, $content);
674  $this->assertEquals($compareContent, $resolvedContent);
675  $this->assertEmpty($this->invalidTags);
676  }
677 
681  public function testSecondaryEmailMergeTag()
682  {
683  $content = 'secondaryEmail: [[SECONDARY^EMAIL]] [[SECONDARY^EMAIL__EMAIL^ADDRESS]] ' .
684  '[[SECONDARY^EMAIL__IS^INVALID]] [[SECONDARY^EMAIL__OPT^OUT]]';
685  $compareContent = 'secondaryEmail: jake@zurmo.com jake@zurmo.com 0 1';
686  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
687  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
688  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
689  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
690  $this->assertTrue($resolvedContent !== false);
691  $this->assertNotEquals($resolvedContent, $content);
692  $this->assertEquals($compareContent, $resolvedContent);
693  $this->assertEmpty($this->invalidTags);
694  }
695 
699  public function testAddressMergeTag()
700  {
701  $content = 'address: [[PRIMARY^ADDRESS]] [[PRIMARY^ADDRESS__STREET1]] ' .
702  '[[PRIMARY^ADDRESS__STREET2]] [[PRIMARY^ADDRESS__CITY]] ' .
703  '[[PRIMARY^ADDRESS__STATE]] [[PRIMARY^ADDRESS__POSTAL^CODE]] ' .
704  '[[PRIMARY^ADDRESS__COUNTRY]]';
705  $compareContent = 'address: SomeStreet1, SomeStreet2, SomeCity, SomeState, 1111, SomeCountry' .
706  ' SomeStreet1 SomeStreet2 SomeCity SomeState 1111 SomeCountry';
707  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
708  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
709  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
710  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
711  $this->assertTrue($resolvedContent !== false);
712  $this->assertNotEquals($resolvedContent, $content);
713  $this->assertEquals($compareContent, $resolvedContent);
714  $this->assertEmpty($this->invalidTags);
715  }
716 
721  {
722  $content = 'address: [[ACCOUNT__BILLING^ADDRESS__STREET1]] [[ACCOUNT__NAME]]';
723  $compareContent = 'address: AccountStreet1 Account1';
724  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
725  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
726  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
727  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$contact, $this->invalidTags);
728  $this->assertTrue($resolvedContent !== false);
729  $this->assertNotEquals($resolvedContent, $content);
730  $this->assertEquals($compareContent, $resolvedContent);
731  $this->assertEmpty($this->invalidTags);
732  }
733 
738  {
739  $content = 'likeContactState: [[LIKE^CONTACT^STATE]] [[LIKE^CONTACT^STATE__NAME]] ' .
740  '[[LIKE^CONTACT^STATE__ORDER]][[LIKE^CONTACT^STATE__SERIALIZED^LABELS]]';
741  $compareContent = 'likeContactState: Customer Customer 0';
742  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
743  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
744  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
745  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
746  $this->assertTrue($resolvedContent !== false);
747  $this->assertNotEquals($resolvedContent, $content);
748  $this->assertEquals($compareContent, $resolvedContent);
749  $this->assertEmpty($this->invalidTags);
750  }
751 
755  public function testUserMergeTag()
756  {
757  $content = 'user: [[USER__HASH]] [[USER__LAST^NAME]] [[USER__LANGUAGE]] [[USER__TIME^ZONE]]' .
758  ' [[USER__USERNAME]] [[USER__CURRENCY]] [[USER__CURRENCY__CODE]]';
759  $compareContent = 'user: '. static::$hash .' Kevin es America/Chicago kevinjones USD USD';
760  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
761  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
762  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
763  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
764  $this->assertTrue($resolvedContent !== false);
765  $this->assertNotEquals($resolvedContent, $content);
766  $this->assertEquals($compareContent, $resolvedContent);
767  $this->assertEmpty($this->invalidTags);
768  }
769 
773  public function testModelUrlMergeTag()
774  {
775  $content = '[[MODEL^URL]]';
776  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
777  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
778  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
779  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
780  $this->assertTrue($resolvedContent !== false);
781  $this->assertNotEquals($resolvedContent, $content);
782  $expectedSuffix = '/emailTemplates/default/details?id=' . static::$emailTemplate->id;
783  $this->assertContains($expectedSuffix, $resolvedContent);
784  $this->assertEmpty($this->invalidTags);
785  }
786 
791  {
792  $content = '[[MODEL^URL]]';
793  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
794  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
795  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
796  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$contact, $this->invalidTags);
797  $this->assertTrue($resolvedContent !== false);
798  $this->assertNotEquals($resolvedContent, $content);
799  $expectedSuffix = '/contacts/default/details?id=' . static::$contact->id;
800  $this->assertContains($expectedSuffix, $resolvedContent);
801  $this->assertEmpty($this->invalidTags);
802 
803  $content = '[[MODEL^URL]]';
804  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
805  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
806  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
807  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$lead, $this->invalidTags);
808  $this->assertTrue($resolvedContent !== false);
809  $this->assertNotEquals($resolvedContent, $content);
810  $expectedSuffix = '/leads/default/details?id=' . static::$lead->id;
811  $this->assertContains($expectedSuffix, $resolvedContent);
812  $this->assertEmpty($this->invalidTags);
813  }
814 
818  public function testModelCustomAttribute()
819  {
820  $content = 'customCstm: [[CUSTOM^CSTM]]';
821  $compareContent = 'customCstm: text custom';
822  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
823  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
824  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
825  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
826  $this->assertTrue($resolvedContent !== false);
827  $this->assertNotEquals($resolvedContent, $content);
828  $this->assertEquals($compareContent, $resolvedContent);
829  $this->assertEmpty($this->invalidTags);
830 
831  $content = 'custom_attr_2Cstm: [[CUSTOM_ATTR_2^CSTM]]';
832  $compareContent = 'custom_attr_2Cstm: text custom 2';
833  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
834  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
835  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
836  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
837  $this->assertTrue($resolvedContent !== false);
838  $this->assertNotEquals($resolvedContent, $content);
839  $this->assertEquals($compareContent, $resolvedContent);
840  $this->assertEmpty($this->invalidTags);
841  }
842 
846  public function testApplicationNameMergeTag()
847  {
848  ZurmoConfigurationUtil::setByModuleName('ZurmoModule', 'applicationName', 'Demo App');
849  $content = '[[APPLICATION^NAME]]';
850  $expectedContent = ZurmoConfigurationUtil::getByModuleName('ZurmoModule', 'applicationName');
851  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
852  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
853  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
854  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
855  $this->assertTrue($resolvedContent !== false);
856  $this->assertNotEquals($resolvedContent, $content);
857  $this->assertEquals($expectedContent, $resolvedContent);
858  $this->assertEmpty($this->invalidTags);
859  }
860 
864  public function testCurrentYearMergeTag()
865  {
866  $content = '[[CURRENT^YEAR]]';
867  $expectedContent = date('Y');
868  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
869  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
870  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
871  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
872  $this->assertTrue($resolvedContent !== false);
873  $this->assertNotEquals($resolvedContent, $content);
874  $this->assertEquals($expectedContent, $resolvedContent);
875  $this->assertEmpty($this->invalidTags);
876  }
877 
881  public function testLastYearMergeTag()
882  {
883  $content = '[[LAST^YEAR]]';
884  $expectedContent = date('Y') - 1;
885  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
886  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
887  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
888  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
889  $this->assertTrue($resolvedContent !== false);
890  $this->assertNotEquals($resolvedContent, $content);
891  $this->assertEquals($expectedContent, $resolvedContent);
892  $this->assertEmpty($this->invalidTags);
893  }
894 
898  public function testBaseUrlMergeTag()
899  {
900  $content = '[[BASE^URL]]';
901  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
902  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
903  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
904  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$emailTemplate, $this->invalidTags);
905  $this->assertTrue($resolvedContent !== false);
906  $this->assertNotEquals($resolvedContent, $content);
907  $this->assertContains('localhost', $resolvedContent);
908  $this->assertEmpty($this->invalidTags);
909  }
910 
915  {
916  $content = '[[OWNERS^AVATAR^SMALL]]';
917  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
918  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
919  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
920  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$contact, $this->invalidTags);
921  $this->assertTrue($resolvedContent !== false);
922  $this->assertNotEquals($resolvedContent, $content);
923  $expectedAvatarImage = '<img class="gravatar" width="32" height="32" src="http://www.gravatar.com/avatar/?s=32&amp;r=g&amp;d=mm" alt="Clark Kent" />'; // Not Coding Standard
924  $this->assertEquals($expectedAvatarImage, $resolvedContent);
925  $this->assertEmpty($this->invalidTags);
926  }
927 
932  {
933  $content = '[[OWNERS^AVATAR^MEDIUM]]';
934  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
935  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
936  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
937  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$contact, $this->invalidTags);
938  $this->assertTrue($resolvedContent !== false);
939  $this->assertNotEquals($resolvedContent, $content);
940  $expectedAvatarImage = '<img class="gravatar" width="64" height="64" src="http://www.gravatar.com/avatar/?s=64&amp;r=g&amp;d=mm" alt="Clark Kent" />'; // Not Coding Standard
941  $this->assertEquals($expectedAvatarImage, $resolvedContent);
942  $this->assertEmpty($this->invalidTags);
943  }
944 
949  {
950  $content = '[[OWNERS^AVATAR^LARGE]]';
951  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
952  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
953  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
954  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$contact, $this->invalidTags);
955  $this->assertTrue($resolvedContent !== false);
956  $this->assertNotEquals($resolvedContent, $content);
957  $expectedAvatarImage = '<img class="gravatar" width="128" height="128" src="http://www.gravatar.com/avatar/?s=128&amp;r=g&amp;d=mm" alt="Clark Kent" />'; // Not Coding Standard
958  $this->assertEquals($expectedAvatarImage, $resolvedContent);
959  $this->assertEmpty($this->invalidTags);
960  }
961 
966  {
967  $content = '[[OWNERS^EMAIL^SIGNATURE]]';
968  $mergeTagsUtil = MergeTagsUtilFactory::make(EmailTemplate::TYPE_CONTACT, null, $content);
969  $this->assertTrue($mergeTagsUtil instanceof MergeTagsUtil);
970  $this->assertTrue($mergeTagsUtil instanceof ContactMergeTagsUtil);
971  $resolvedContent = $mergeTagsUtil->resolveMergeTags(self::$contact, $this->invalidTags);
972  $this->assertTrue($resolvedContent !== false);
973  $this->assertNotEquals($resolvedContent, $content);
974  $expectedEmailSignature = 'my email signature';
975  $this->assertEquals($expectedEmailSignature, $resolvedContent);
976  $this->assertEmpty($this->invalidTags);
977  }
978  }
979 ?>
Definition: Email.php:37
static getByUsername($username)
Definition: User.php:49
Definition: User.php:37
static make($emailTemplateType, $language, $content)
static loadStartingData()
static getAll($orderBy=null, $sortDescending=false, $modelClassName=null, $buildFirstCurrency=true)
Definition: Currency.php:107
static getByModuleName($moduleName, $key, $cache=true)
static getAll($orderBy=null, $sortDescending=false, $modelClassName=null)
static generateRandomString($length=10, $characterSet=null)
Definition: StringUtil.php:156
static setByModuleName($moduleName, $key, $value, $cache=true)
Generated on Wed Sep 30 2020 07:10:32
Account Suspended
Account Suspended
This Account has been suspended.
Contact your hosting provider for more information.