14 $this->assertInstanceOf(MainNotificationCollector::class, $collector);
22 $this->assertFalse($collector->hasItems());
24 $group_notification = $this->factory->standardGroup($this->
id);
27 $this->assertTrue($collector->hasItems());
35 $this->assertEquals([], $collector->getNotifications());
37 $group_notification = $this->factory->standardGroup($this->
id);
40 $this->assertEquals([$group_notification], $collector->getNotifications());
42 $group_notification = $this->factory->standardGroup($this->
id);
45 $this->assertEquals([$group_notification, $group_notification], $collector->getNotifications());
53 $this->assertEquals(0, $collector->getAmountOfNewNotifications());
55 $group_notification = $this->factory->standardGroup($this->
id);
58 $this->assertEquals(0, $collector->getAmountOfNewNotifications());
60 $group_notification = $this->factory->standardGroup($this->
id);
61 $standard_notification = $this->factory->standard($this->
id)->withNewAmount(3);
62 $group_notification->addNotification($standard_notification);
63 $group_notification->addNotification($standard_notification);
67 $this->assertEquals(4, $collector->getAmountOfNewNotifications());
75 $this->assertEquals(0, $collector->getAmountOfOldNotifications());
77 $group_notification = $this->factory->standardGroup($this->
id);
80 $this->assertEquals(0, $collector->getAmountOfOldNotifications());
82 $group_notification = $this->factory->standardGroup($this->
id);
83 $standard_notification = $this->factory->standard($this->
id)->withOldAmount(3);
84 $group_notification->addNotification($standard_notification);
85 $group_notification->addNotification($standard_notification);
89 $this->assertEquals(4, $collector->getAmountOfOldNotifications());
98 $this->assertEquals([], $collector->getNotificationsIdentifiersAsArray());
100 $group_notification = $this->factory->standardGroup($this->
id);
104 $this->assertEquals([$this->
id->serialize()], $collector->getNotificationsIdentifiersAsArray());
106 $group_notification = $this->factory->standardGroup($this->
id);
110 $this->assertEquals([$this->
id->serialize(), $this->
id->serialize()], $collector->getNotificationsIdentifiersAsArray());
Class MainNotificationCollector.
testGetNotificationsIdentifiersAsArray()
Class BaseNotificationSetUp.
Class MainNotificationCollectorTest.
testGetAmountOfOldNotifications()
getDummyNotificationsProviderWithNotifications($notifications)
testGetAmountOfNewNotifications()