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

@@ -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']
);
});
}