5 require_once(__DIR__ .
"/../BaseNotificationSetUp.php");
16 $this->assertInstanceOf(MainNotificationCollector::class, $collector);
24 $this->assertFalse($collector->hasItems());
26 $group_notification = $this->factory->standardGroup($this->
id);
29 $this->assertTrue($collector->hasItems());
37 $this->assertEquals([], $collector->getNotifications());
39 $group_notification = $this->factory->standardGroup($this->
id);
42 $this->assertEquals([$group_notification], $collector->getNotifications());
44 $group_notification = $this->factory->standardGroup($this->
id);
47 $this->assertEquals([$group_notification, $group_notification], $collector->getNotifications());
55 $this->assertEquals(0, $collector->getAmountOfNewNotifications());
57 $group_notification = $this->factory->standardGroup($this->
id);
60 $this->assertEquals(0, $collector->getAmountOfNewNotifications());
62 $group_notification = $this->factory->standardGroup($this->
id);
63 $standard_notification = $this->factory->standard($this->
id)->withNewAmount(3);
64 $group_notification->addNotification($standard_notification);
65 $group_notification->addNotification($standard_notification);
69 $this->assertEquals(4, $collector->getAmountOfNewNotifications());
77 $this->assertEquals(0, $collector->getAmountOfOldNotifications());
79 $group_notification = $this->factory->standardGroup($this->
id);
82 $this->assertEquals(0, $collector->getAmountOfOldNotifications());
84 $group_notification = $this->factory->standardGroup($this->
id);
85 $standard_notification = $this->factory->standard($this->
id)->withOldAmount(3);
86 $group_notification->addNotification($standard_notification);
87 $group_notification->addNotification($standard_notification);
91 $this->assertEquals(4, $collector->getAmountOfOldNotifications());
100 $this->assertEquals([], $collector->getNotificationsIdentifiersAsArray());
102 $group_notification = $this->factory->standardGroup($this->
id);
106 $this->assertEquals([$this->
id->serialize()], $collector->getNotificationsIdentifiersAsArray());
108 $group_notification = $this->factory->standardGroup($this->
id);
112 $this->assertEquals([$this->
id->serialize(), $this->
id->serialize()], $collector->getNotificationsIdentifiersAsArray());
Class MainNotificationCollector.
testGetNotificationsIdentifiersAsArray()
Class BaseNotificationSetUp.
Class MainNotificationCollectorTest.
testGetAmountOfOldNotifications()
getDummyNotificationsProviderWithNotifications($notifications)
testGetAmountOfNewNotifications()