mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-10 15:29:41 +00:00
Merge branch 'master' into migrate_to_sf72
# Conflicts: # src/Bundle/ChillMainBundle/Controller/UserProfileController.php # src/Bundle/ChillMainBundle/Entity/User.php # src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkDuplicateController.php # src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationDocumentDuplicateController.php # src/Bundle/ChillPersonBundle/Form/Type/PickLinkedAccompanyingPeriodWorkType.php
This commit is contained in:
@@ -96,11 +96,13 @@ final class NotificationTest extends KernelTestCase
|
||||
$this->assertTrue($user->isNotificationSendImmediately($notification->getType()), 'Should return true when no notification flags are set, by default immediate email');
|
||||
|
||||
// immediate-email preference
|
||||
$user->setNotificationFlags(['test_notification_type' => [User::NOTIF_FLAG_IMMEDIATE_EMAIL, User::NOTIF_FLAG_DAILY_DIGEST]]);
|
||||
$user->setNotificationImmediately('test_notification_type', true);
|
||||
$user->setNotificationDailyDigest('test_notification_type', true);
|
||||
$this->assertTrue($user->isNotificationSendImmediately($notification->getType()), 'Should return true when preferences contain immediate-email');
|
||||
|
||||
// daily-email preference
|
||||
$user->setNotificationFlags(['test_notification_type' => [User::NOTIF_FLAG_DAILY_DIGEST]]);
|
||||
$user->setNotificationDailyDigest('test_notification_type', true);
|
||||
$user->setNotificationImmediately('test_notification_type', false);
|
||||
$this->assertFalse($user->isNotificationSendImmediately($notification->getType()), 'Should return false when preference is daily-email only');
|
||||
$this->assertTrue($user->isNotificationDailyDigest($notification->getType()), 'Should return true when preference is daily-email');
|
||||
|
||||
|
Reference in New Issue
Block a user