mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Fix unit tests
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
use Alchemy\Phrasea\Notification\Deliverer;
|
||||
use Alchemy\Phrasea\Notification\Emitter;
|
||||
use Silex\Application;
|
||||
use Silex\ServiceProviderInterface;
|
||||
|
||||
@@ -10,8 +11,24 @@ class NotificationDelivererServiceProvider implements ServiceProviderInterface
|
||||
{
|
||||
public function register(Application $app)
|
||||
{
|
||||
$app['notification.default.emitter'] = $app->share(function (Application $app) {
|
||||
return new Emitter(
|
||||
$app['phraseanet.registry']->get('GV_defaulmailsenderaddr', 'no-reply@phraseanet.com'),
|
||||
$app['phraseanet.registry']->get('GV_homeTitle', 'Phraseanet')
|
||||
);
|
||||
});
|
||||
|
||||
$app['notification.prefix'] = $app->share(function (Application $app) {
|
||||
return $app['phraseanet.registry']->get('GV_email_prefix');
|
||||
});
|
||||
|
||||
$app['notification.deliverer'] = $app->share(function($app) {
|
||||
return new Deliverer($app['mailer'], $app['phraseanet.registry'], $app['dispatcher']);
|
||||
return new Deliverer(
|
||||
$app['mailer'],
|
||||
$app['dispatcher'],
|
||||
$app['notification.default.emitter'],
|
||||
$app['notification.prefix']
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user