Exemplo n.º 1
0
 /**
  * testSendProfileDeletedAdminNotification
  *
  * @return void
  * @access public
  * @see    ____func_see____
  * @since  1.0.0
  */
 public function testSendProfileDeletedAdminNotification()
 {
     $profile = self::$admin_profile;
     $this->startCheckingMail();
     \XLite\Core\Mailer::sendProfileDeletedAdminNotification(self::TESTER_EMAIL);
     sleep(3);
     $emails = $this->finishCheckingMail();
     if (empty($emails)) {
         $this->markTestSkipped('Email notification not found in the mail box');
     }
     $email = array_shift($emails);
     $this->assertRegexp('/To: ' . preg_quote(self::ADMIN_EMAIL) . '/msS', $email['header'], 'Wrong email recipient' . $email['header']);
     $this->assertRegexp('/User profile is deleted/msS', $email['body'], '"User profile is deleted" text not found in the email body');
 }
Exemplo n.º 2
0
 /**
  * Delete profile action
  *
  * @return void
  */
 protected function doActionDelete()
 {
     $result = $this->getModelForm()->performAction('delete');
     // Send notification to the user
     \XLite\Core\Mailer::sendProfileDeletedAdminNotification($this->getProfile()->getLogin());
     $this->setReturnURL($this->buildURL('profile_list'));
 }
Exemplo n.º 3
0
 /**
  * doActionDelete
  *
  * @return void
  */
 protected function doActionDelete()
 {
     $userLogin = $this->getModelForm()->getModelObject()->getLogin();
     $result = $this->getModelForm()->performAction('delete');
     if ($result) {
         // Send notification to the users department
         \XLite\Core\Mailer::sendProfileDeletedAdminNotification($userLogin);
     }
     $this->setReturnURL($this->buildURL());
     return $result;
 }