Class StandardNotificationTest.
More...
◆ testAddNotification()
GroupNotificationTest::testAddNotification |
( |
| ) |
|
Definition at line 26 of file GroupNotificationTest.php.
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());
◆ testConstructByFactory()
GroupNotificationTest::testConstructByFactory |
( |
| ) |
|
Definition at line 12 of file GroupNotificationTest.php.
14 $group_notification = $this->factory->standardGroup($this->
id);
16 $this->assertInstanceOf(StandardNotificationGroup::class, $group_notification);
17 $this->assertEquals($this->
id, $group_notification->getProviderIdentification());
◆ testGetProviderIdentification()
GroupNotificationTest::testGetProviderIdentification |
( |
| ) |
|
Tests on AbstractBaseNotification.
Definition at line 73 of file GroupNotificationTest.php.
75 $standard_notification = $this->factory->standard($this->
id);
76 $this->assertEquals($this->
id, $standard_notification->getProviderIdentification());
◆ testGetRenderer()
GroupNotificationTest::testGetRenderer |
( |
| ) |
|
Definition at line 79 of file GroupNotificationTest.php.
81 $group_notification = $this->factory->standardGroup($this->
id);
82 $this->assertInstanceOf(
83 StandardNotificationGroupRenderer::class,
84 $group_notification->getRenderer($this->getUIFactory())
◆ testNewNotificationCount()
GroupNotificationTest::testNewNotificationCount |
( |
| ) |
|
Definition at line 48 of file GroupNotificationTest.php.
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());
◆ testNotificationCount()
GroupNotificationTest::testNotificationCount |
( |
| ) |
|
Definition at line 37 of file GroupNotificationTest.php.
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());
◆ testOldNotificationCount()
GroupNotificationTest::testOldNotificationCount |
( |
| ) |
|
Definition at line 59 of file GroupNotificationTest.php.
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());
◆ testWithOpenedCallable()
GroupNotificationTest::testWithOpenedCallable |
( |
| ) |
|
Definition at line 88 of file GroupNotificationTest.php.
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());
◆ testWitTitle()
GroupNotificationTest::testWitTitle |
( |
| ) |
|
Definition at line 20 of file GroupNotificationTest.php.
22 $group_notification = $this->factory->standardGroup($this->
id)->withTitle(
"test");
23 $this->assertEquals(
"test", $group_notification->getTitle());
The documentation for this class was generated from the following file: