Class StandardNotificationTest.
More...
◆ testAddNotification()
GroupNotificationTest::testAddNotification |
( |
| ) |
|
Definition at line 43 of file GroupNotificationTestTBD.php.
43 : void
44 {
45 $group_notification = $this->
factory->standardGroup($this->
id);
46 $this->assertEquals([], $group_notification->getNotifications());
47 $standard_notification = $this->
factory->standard($this->
id);
48 $group_notification->addNotification($standard_notification);
49 $this->assertEquals([$standard_notification], $group_notification->getNotifications());
50 $group_notification->addNotification($standard_notification);
51 $this->assertEquals([$standard_notification,$standard_notification], $group_notification->getNotifications());
52 }
References factory().
◆ testConstructByFactory()
GroupNotificationTest::testConstructByFactory |
( |
| ) |
|
Definition at line 29 of file GroupNotificationTestTBD.php.
29 : void
30 {
31 $group_notification = $this->
factory->standardGroup($this->
id);
32
33 $this->assertInstanceOf(StandardNotificationGroup::class, $group_notification);
34 $this->assertEquals($this->id, $group_notification->getProviderIdentification());
35 }
References factory().
◆ testGetProviderIdentification()
GroupNotificationTest::testGetProviderIdentification |
( |
| ) |
|
Tests on AbstractBaseNotification.
Definition at line 90 of file GroupNotificationTestTBD.php.
90 : void
91 {
92 $standard_notification = $this->
factory->standard($this->
id);
93 $this->assertEquals($this->id, $standard_notification->getProviderIdentification());
94 }
References factory().
◆ testGetRenderer()
GroupNotificationTest::testGetRenderer |
( |
| ) |
|
Definition at line 96 of file GroupNotificationTestTBD.php.
96 : void
97 {
98 $group_notification = $this->
factory->standardGroup($this->
id);
99 $this->assertInstanceOf(
100 StandardNotificationGroupRenderer::class,
101 $group_notification->getRenderer($this->getUIFactory())
102 );
103 }
References factory().
◆ testNewNotificationCount()
GroupNotificationTest::testNewNotificationCount |
( |
| ) |
|
Definition at line 65 of file GroupNotificationTestTBD.php.
65 : void
66 {
67 $group_notification = $this->
factory->standardGroup($this->
id);
68 $this->assertEquals(0, $group_notification->getNewNotificationsCount());
69 $standard_notification = $this->
factory->standard($this->
id)->withNewAmount(3);
70 $group_notification->addNotification($standard_notification);
71 $this->assertEquals(3, $group_notification->getNewNotificationsCount());
72 $group_notification->addNotification($standard_notification);
73 $this->assertEquals(6, $group_notification->getNewNotificationsCount());
74 }
References factory().
◆ testNotificationCount()
GroupNotificationTest::testNotificationCount |
( |
| ) |
|
Definition at line 54 of file GroupNotificationTestTBD.php.
54 : void
55 {
56 $group_notification = $this->
factory->standardGroup($this->
id);
57 $this->assertEquals(0, $group_notification->getNotificationsCount());
58 $standard_notification = $this->
factory->standard($this->
id);
59 $group_notification->addNotification($standard_notification);
60 $this->assertEquals(1, $group_notification->getNotificationsCount());
61 $group_notification->addNotification($standard_notification);
62 $this->assertEquals(2, $group_notification->getNotificationsCount());
63 }
References factory().
◆ testOldNotificationCount()
GroupNotificationTest::testOldNotificationCount |
( |
| ) |
|
Definition at line 76 of file GroupNotificationTestTBD.php.
76 : void
77 {
78 $group_notification = $this->
factory->standardGroup($this->
id);
79 $this->assertEquals(0, $group_notification->getOldNotificationsCount());
80 $standard_notification = $this->
factory->standard($this->
id)->withOldAmount(3);
81 $group_notification->addNotification($standard_notification);
82 $this->assertEquals(3, $group_notification->getOldNotificationsCount());
83 $group_notification->addNotification($standard_notification);
84 $this->assertEquals(6, $group_notification->getOldNotificationsCount());
85 }
References factory().
◆ testWithOpenedCallable()
GroupNotificationTest::testWithOpenedCallable |
( |
| ) |
|
Definition at line 105 of file GroupNotificationTestTBD.php.
105 : void
106 {
107 $callable = (fn(): string => "something");
108 $standard_notification = $this->
factory->standard($this->
id);
109 $this->assertEquals(function (): void {
110 }, $standard_notification->getOpenedCallable());
111 $standard_notification = $standard_notification->withOpenedCallable($callable);
112 $this->assertEquals($callable, $standard_notification->getOpenedCallable());
113 }
References factory().
◆ testWitTitle()
GroupNotificationTest::testWitTitle |
( |
| ) |
|
Definition at line 37 of file GroupNotificationTestTBD.php.
37 : void
38 {
39 $group_notification = $this->
factory->standardGroup($this->
id)->withTitle(
"test");
40 $this->assertEquals("test", $group_notification->getTitle());
41 }
References factory().
The documentation for this class was generated from the following file: