5 require_once(__DIR__ .
"/../BaseNotificationSetUp.php");
14 $group_notification = $this->factory->standardGroup($this->
id);
16 $this->assertInstanceOf(StandardNotificationGroup::class, $group_notification);
17 $this->assertEquals($this->
id, $group_notification->getProviderIdentification());
22 $group_notification = $this->factory->standardGroup($this->
id)->withTitle(
"test");
23 $this->assertEquals(
"test", $group_notification->getTitle());
28 $group_notification = $this->factory->standardGroup($this->
id);
29 $this->assertEquals([], $group_notification->getNotifications());
30 $standard_notification = $this->factory->standard($this->
id);
31 $group_notification->addNotification($standard_notification);
32 $this->assertEquals([$standard_notification], $group_notification->getNotifications());
33 $group_notification->addNotification($standard_notification);
34 $this->assertEquals([$standard_notification,$standard_notification], $group_notification->getNotifications());
39 $group_notification = $this->factory->standardGroup($this->
id);
40 $this->assertEquals(0, $group_notification->getNotificationsCount());
41 $standard_notification = $this->factory->standard($this->
id);
42 $group_notification->addNotification($standard_notification);
43 $this->assertEquals(1, $group_notification->getNotificationsCount());
44 $group_notification->addNotification($standard_notification);
45 $this->assertEquals(2, $group_notification->getNotificationsCount());
50 $group_notification = $this->factory->standardGroup($this->
id);
51 $this->assertEquals(0, $group_notification->getNewNotificationsCount());
52 $standard_notification = $this->factory->standard($this->
id)->withNewAmount(3);
53 $group_notification->addNotification($standard_notification);
54 $this->assertEquals(3, $group_notification->getNewNotificationsCount());
55 $group_notification->addNotification($standard_notification);
56 $this->assertEquals(6, $group_notification->getNewNotificationsCount());
61 $group_notification = $this->factory->standardGroup($this->
id);
62 $this->assertEquals(0, $group_notification->getOldNotificationsCount());
63 $standard_notification = $this->factory->standard($this->
id)->withOldAmount(3);
64 $group_notification->addNotification($standard_notification);
65 $this->assertEquals(3, $group_notification->getOldNotificationsCount());
66 $group_notification->addNotification($standard_notification);
67 $this->assertEquals(6, $group_notification->getOldNotificationsCount());
75 $standard_notification = $this->factory->standard($this->
id);
76 $this->assertEquals($this->
id, $standard_notification->getProviderIdentification());
81 $group_notification = $this->factory->standardGroup($this->
id);
82 $this->assertInstanceOf(
83 StandardNotificationGroupRenderer::class,
84 $group_notification->getRenderer($this->getUIFactory())
90 $callable =
function () {
93 $standard_notification = $this->factory->standard($this->
id);
94 $this->assertEquals(
function () {
95 }, $standard_notification->getOpenedCallable());
96 $standard_notification = $standard_notification->withOpenedCallable($callable);
97 $this->assertEquals($callable, $standard_notification->getOpenedCallable());
testNewNotificationCount()
Class BaseNotificationSetUp.
testGetProviderIdentification()
Tests on AbstractBaseNotification.
Class StandardNotificationTest.
testOldNotificationCount()