Exemple #1
0
 /**
  * Send message for admin when created new user.
  *
  * @return void
  */
 public function adminNewUserMsg()
 {
     $adminMail = Plugin::params('Union/Core')->get('admin_mail', '*****@*****.**');
     $tpl = $this->_params->get('msg_adm_new_registration');
     $msg = $this->_macros->text($tpl);
     $subject = $this->_params->get('msg_adm_new_reg_subject', __d('community', 'Registered a new user'));
     $this->send($subject, $msg, $adminMail);
 }
Exemple #2
0
 /**
  * @return void
  */
 public function testText()
 {
     $macros = new Macros(['name' => 'Sergey', 'age' => 26]);
     $expected = 'Hi, i\'m Sergey and me 26 years';
     $actual = $macros->text('Hi, i\'m {name} and me {age} years');
     $this->assertSame($expected, $actual);
 }