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

@@ -111,15 +111,20 @@ class eventsmanager_notify_order extends eventsmanager_notifyAbstract
$mailed = false;
if ($this->shouldSendNotificationFor($user->get_id())) {
$readyToSend = false;
try {
$receiver = Receiver::fromUser($user);
$readyToSend = true;
} catch (Exception $e) {
continue;
}
if ($readyToSend) {
$mail = MailInfoNewOrder::create($this->app, $receiver);
$mail->setUser($orderInitiator);
$this->app['notification.deliverer']->deliver($mail);
$mailed = true;
} catch (\Exception $e) {
}
}