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

@@ -546,12 +546,8 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
$mailOldAddress = MailSuccessEmailUpdate::create($this->app, $oldReceiver, null, sprintf(_('You will now receive notifications at %s'), $new_email));
$mailNewAddress = MailSuccessEmailUpdate::create($this->app, $newReceiver, null, sprintf(_('You will no longer receive notifications at %s'), $old_email));
try {
$this->app['notification.deliverer']->deliver($mailOldAddress);
$this->app['notification.deliverer']->deliver($mailNewAddress);
} catch (\Exception $e) {
}
$this->app['notification.deliverer']->deliver($mailOldAddress);
$this->app['notification.deliverer']->deliver($mailNewAddress);
}
return $this;

View File

@@ -14,6 +14,7 @@ namespace Alchemy\Phrasea\Helper\User;
use Alchemy\Phrasea\Helper\Helper;
use Alchemy\Phrasea\Notification\Receiver;
use Alchemy\Phrasea\Notification\Mail\MailRequestPasswordSetup;
use Alchemy\Phrasea\Notification\Mail\MailSuccessEmailConfirmationUnregistered;
/**
*
@@ -183,7 +184,7 @@ class Manage extends Helper
if (false !== $urlToken) {
$mail = MailSuccessEmailConfirmationUnregistered::create($this->app, Receiver::fromUser($createdUser));
$mail->setUrl($this->app['url_generator']->generate('login_forgot_password', array('token' => $urlToken), true));
$mail->setButtonUrl($this->app['url_generator']->generate('login_forgot_password', array('token' => $urlToken), true));
$this->app['notification.deliverer']->deliver($mail);
}
}