diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-10-16 07:40:09 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-10-16 07:40:09 +0200 |
commit | 2aac2f278f1ca63f2097f80ddbdb924dea9ec59e (patch) | |
tree | cc09f37927d4a7ffbf576f636db0d36015190b08 /src/Wallabag/CoreBundle/EventListener | |
parent | c89d35e851d26b78f89bd7ece5e3eaa109c8cac0 (diff) | |
download | wallabag-2aac2f278f1ca63f2097f80ddbdb924dea9ec59e.tar.gz wallabag-2aac2f278f1ca63f2097f80ddbdb924dea9ec59e.tar.zst wallabag-2aac2f278f1ca63f2097f80ddbdb924dea9ec59e.zip |
Add tests on listeners
Diffstat (limited to 'src/Wallabag/CoreBundle/EventListener')
-rw-r--r-- | src/Wallabag/CoreBundle/EventListener/LocaleListener.php | 3 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/EventListener/LocaleListener.php b/src/Wallabag/CoreBundle/EventListener/LocaleListener.php index 71795316..80f59504 100644 --- a/src/Wallabag/CoreBundle/EventListener/LocaleListener.php +++ b/src/Wallabag/CoreBundle/EventListener/LocaleListener.php | |||
@@ -6,6 +6,9 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |||
6 | use Symfony\Component\HttpKernel\KernelEvents; | 6 | use Symfony\Component\HttpKernel\KernelEvents; |
7 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; | 7 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
8 | 8 | ||
9 | /** | ||
10 | * @see http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html | ||
11 | */ | ||
9 | class LocaleListener implements EventSubscriberInterface | 12 | class LocaleListener implements EventSubscriberInterface |
10 | { | 13 | { |
11 | private $defaultLocale; | 14 | private $defaultLocale; |
diff --git a/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php b/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php index 97bfabc8..82d1a63a 100644 --- a/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php +++ b/src/Wallabag/CoreBundle/EventListener/UserLocaleListener.php | |||
@@ -8,6 +8,8 @@ use Symfony\Component\Security\Http\Event\InteractiveLoginEvent; | |||
8 | /** | 8 | /** |
9 | * Stores the locale of the user in the session after the | 9 | * Stores the locale of the user in the session after the |
10 | * login. This can be used by the LocaleListener afterwards. | 10 | * login. This can be used by the LocaleListener afterwards. |
11 | * | ||
12 | * @see http://symfony.com/doc/master/cookbook/session/locale_sticky_session.html | ||
11 | */ | 13 | */ |
12 | class UserLocaleListener | 14 | class UserLocaleListener |
13 | { | 15 | { |