Class StandardNotificationTest.
More...
◆ testAddNotification()
GroupNotificationTest::testAddNotification |
( |
| ) |
|
Definition at line 43 of file GroupNotificationTest.php.
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());
◆ testConstructByFactory()
GroupNotificationTest::testConstructByFactory |
( |
| ) |
|
Definition at line 29 of file GroupNotificationTest.php.
31 $group_notification = $this->factory->standardGroup($this->
id);
33 $this->assertInstanceOf(StandardNotificationGroup::class, $group_notification);
34 $this->assertEquals($this->
id, $group_notification->getProviderIdentification());
◆ testGetProviderIdentification()
GroupNotificationTest::testGetProviderIdentification |
( |
| ) |
|
Tests on AbstractBaseNotification.
Definition at line 90 of file GroupNotificationTest.php.
92 $standard_notification = $this->factory->standard($this->
id);
93 $this->assertEquals($this->
id, $standard_notification->getProviderIdentification());
◆ testGetRenderer()
GroupNotificationTest::testGetRenderer |
( |
| ) |
|
Definition at line 96 of file GroupNotificationTest.php.
98 $group_notification = $this->factory->standardGroup($this->
id);
99 $this->assertInstanceOf(
100 StandardNotificationGroupRenderer::class,
101 $group_notification->getRenderer($this->getUIFactory())
◆ testNewNotificationCount()
GroupNotificationTest::testNewNotificationCount |
( |
| ) |
|
Definition at line 65 of file GroupNotificationTest.php.
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());
◆ testNotificationCount()
GroupNotificationTest::testNotificationCount |
( |
| ) |
|
Definition at line 54 of file GroupNotificationTest.php.
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());
◆ testOldNotificationCount()
GroupNotificationTest::testOldNotificationCount |
( |
| ) |
|
Definition at line 76 of file GroupNotificationTest.php.
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());
◆ testWithOpenedCallable()
GroupNotificationTest::testWithOpenedCallable |
( |
| ) |
|
Definition at line 105 of file GroupNotificationTest.php.
107 $callable =
function ():
string {
110 $standard_notification = $this->factory->standard($this->
id);
111 $this->assertEquals(
function ():
void {
112 }, $standard_notification->getOpenedCallable());
113 $standard_notification = $standard_notification->withOpenedCallable($callable);
114 $this->assertEquals($callable, $standard_notification->getOpenedCallable());
◆ testWitTitle()
GroupNotificationTest::testWitTitle |
( |
| ) |
|
Definition at line 37 of file GroupNotificationTest.php.
39 $group_notification = $this->factory->standardGroup($this->
id)->withTitle(
"test");
40 $this->assertEquals(
"test", $group_notification->getTitle());
The documentation for this class was generated from the following file: