Class StandardNotificationTest.
More...
◆ testAddNotification()
GroupNotificationTest::testAddNotification |
( |
| ) |
|
Definition at line 26 of file GroupNotificationTest.php.
27 {
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());
35 }
◆ testConstructByFactory()
GroupNotificationTest::testConstructByFactory |
( |
| ) |
|
Definition at line 12 of file GroupNotificationTest.php.
13 {
14 $group_notification = $this->factory->standardGroup($this->id);
15
16 $this->assertInstanceOf(StandardNotificationGroup::class, $group_notification);
17 $this->assertEquals($this->id, $group_notification->getProviderIdentification());
18 }
◆ testGetProviderIdentification()
GroupNotificationTest::testGetProviderIdentification |
( |
| ) |
|
Tests on AbstractBaseNotification.
Definition at line 73 of file GroupNotificationTest.php.
74 {
75 $standard_notification = $this->factory->standard($this->id);
76 $this->assertEquals($this->id, $standard_notification->getProviderIdentification());
77 }
◆ testGetRenderer()
GroupNotificationTest::testGetRenderer |
( |
| ) |
|
Definition at line 79 of file GroupNotificationTest.php.
80 {
81 $group_notification = $this->factory->standardGroup($this->id);
82 $this->assertInstanceOf(
83 StandardNotificationGroupRenderer::class,
84 $group_notification->getRenderer($this->getUIFactory())
85 );
86 }
◆ testNewNotificationCount()
GroupNotificationTest::testNewNotificationCount |
( |
| ) |
|
Definition at line 48 of file GroupNotificationTest.php.
49 {
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());
57 }
◆ testNotificationCount()
GroupNotificationTest::testNotificationCount |
( |
| ) |
|
Definition at line 37 of file GroupNotificationTest.php.
38 {
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());
46 }
◆ testOldNotificationCount()
GroupNotificationTest::testOldNotificationCount |
( |
| ) |
|
Definition at line 59 of file GroupNotificationTest.php.
60 {
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());
68 }
◆ testWithOpenedCallable()
GroupNotificationTest::testWithOpenedCallable |
( |
| ) |
|
Definition at line 88 of file GroupNotificationTest.php.
89 {
90 $callable = function () {
91 return "something";
92 };
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());
98 }
◆ testWitTitle()
GroupNotificationTest::testWitTitle |
( |
| ) |
|
Definition at line 20 of file GroupNotificationTest.php.
21 {
22 $group_notification = $this->factory->standardGroup($this->id)->withTitle("test");
23 $this->assertEquals("test", $group_notification->getTitle());
24 }
The documentation for this class was generated from the following file: