This commit is contained in:
2022-04-13 23:17:16 +02:00
parent 2a53fb9341
commit 35c7d55b8c
5 changed files with 153 additions and 149 deletions

View File

@@ -88,6 +88,24 @@ final class NotificationTest extends KernelTestCase
$this->assertNotContains($user1, $notification->getUnreadBy()->toArray());
}
public function testAddressesEmail(): void
{
$notification = new Notification();
$notification->addAddressesEmail('test');
$notification->addAddressesEmail('other');
$this->assertContains('test', $notification->getAddressesEmails());
$this->assertContains('other', $notification->getAddressesEmails());
$this->assertContains('test', $notification->getAddressesEmailsAdded());
$this->assertContains('other', $notification->getAddressesEmailsAdded());
$notification->removeAddressesEmail('other');
$this->assertNotContains('other', $notification->getAddressesEmails());
$this->assertNotContains('other', $notification->getAddressesEmailsAdded());
}
/**
* @dataProvider generateNotificationData
*/
@@ -122,22 +140,4 @@ final class NotificationTest extends KernelTestCase
$this->assertContains($addresseeId, $unreadIds);
}
}
public function testAddressesEmail(): void
{
$notification = new Notification();
$notification->addAddressesEmail('test');
$notification->addAddressesEmail('other');
$this->assertContains('test', $notification->getAddressesEmails());
$this->assertContains('other', $notification->getAddressesEmails());
$this->assertContains('test', $notification->getAddressesEmailsAdded());
$this->assertContains('other', $notification->getAddressesEmailsAdded());
$notification->removeAddressesEmail('other');
$this->assertNotContains('other', $notification->getAddressesEmails());
$this->assertNotContains('other', $notification->getAddressesEmailsAdded());
}
}