Fix unit tests

This commit is contained in:
Romain Neutron
2013-01-28 19:31:26 +01:00
parent 2fb0c60157
commit aa18c48306
43 changed files with 582 additions and 256 deletions

View File

@@ -119,18 +119,22 @@ class eventsmanager_notify_register extends eventsmanager_notifyAbstract
$mailed = false;
if ($this->shouldSendNotificationFor($usr_id)) {
$readyToSend = false;
try {
$admin_user = User_Adapter::getInstance($usr_id, $this->app);
$receiver = Receiver::fromUser($admin_user);
$readyToSend = true;
} catch (Exception $e) {
continue;
}
if ($readyToSend) {
$mail = MailInfoUserRegistered::create($this->app, $receiver);
$mail->setRegisteredUser($registeredUser);
$this->app['notification.deliverer']->deliver($mail);
$mailed = true;
} catch (Exception $e) {
continue;
}
}