30 $this->assertInstanceOf(MainNotificationCollector::class, $collector);
38 $this->assertFalse($collector->hasItems());
40 $group_notification = $this->
factory->standardGroup($this->
id);
43 $this->assertTrue($collector->hasItems());
51 $this->assertSame([], $collector->getNotifications());
53 $group_notification = $this->
factory->standardGroup($this->
id);
56 $this->assertEquals([$group_notification], $collector->getNotifications());
58 $group_notification = $this->
factory->standardGroup($this->
id);
61 $this->assertEquals([$group_notification, $group_notification], $collector->getNotifications());
69 $this->assertSame(0, $collector->getAmountOfNewNotifications());
71 $group_notification = $this->
factory->standardGroup($this->
id);
74 $this->assertSame(0, $collector->getAmountOfNewNotifications());
76 $group_notification = $this->
factory->standardGroup($this->
id);
77 $standard_notification = $this->
factory->standard($this->
id)->withNewAmount(3);
78 $group_notification->addNotification($standard_notification);
79 $group_notification->addNotification($standard_notification);
83 $this->assertSame(4, $collector->getAmountOfNewNotifications());
91 $this->assertSame(0, $collector->getAmountOfOldNotifications());
93 $group_notification = $this->
factory->standardGroup($this->
id);
96 $this->assertSame(0, $collector->getAmountOfOldNotifications());
98 $group_notification = $this->
factory->standardGroup($this->
id);
99 $standard_notification = $this->
factory->standard($this->
id)->withOldAmount(3);
100 $group_notification->addNotification($standard_notification);
101 $group_notification->addNotification($standard_notification);
105 $this->assertSame(4, $collector->getAmountOfOldNotifications());
114 $this->assertSame([], $collector->getNotificationsIdentifiersAsArray());
116 $group_notification = $this->
factory->standardGroup($this->
id);
120 $this->assertEquals([$this->
id->serialize()], $collector->getNotificationsIdentifiersAsArray());
122 $group_notification = $this->
factory->standardGroup($this->
id);
126 $this->assertEquals([$this->
id->serialize(), $this->id->serialize()], $collector->getNotificationsIdentifiersAsArray());
Class BaseNotificationSetUp.
getDummyNotificationsProviderWithNotifications($notifications)
Class MainNotificationCollector.
Class MainNotificationCollectorTest.
testGetNotificationsIdentifiersAsArray()
testGetAmountOfOldNotifications()
testGetAmountOfNewNotifications()