ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
GroupNotificationTest Class Reference

Class StandardNotificationTest. More...

+ Inheritance diagram for GroupNotificationTest:
+ Collaboration diagram for GroupNotificationTest:

Public Member Functions

 testConstructByFactory ()
 
 testWitTitle ()
 
 testAddNotification ()
 
 testNotificationCount ()
 
 testNewNotificationCount ()
 
 testOldNotificationCount ()
 
 testGetProviderIdentification ()
 Tests on AbstractBaseNotification. More...
 
 testGetRenderer ()
 
 testWithOpenedCallable ()
 
- Public Member Functions inherited from BaseNotificationSetUp
 getUIFactory ()
 
 getDIC ()
 
 getDummyNotificationsProviderWithNotifications ($notifications)
 

Additional Inherited Members

- Protected Member Functions inherited from BaseNotificationSetUp
 setUp ()
 
- Protected Attributes inherited from BaseNotificationSetUp
 $id
 
 $provider
 
 $identification
 
 $factory
 

Detailed Description

Class StandardNotificationTest.

Definition at line 27 of file GroupNotificationTestTBD.php.

Member Function Documentation

◆ testAddNotification()

GroupNotificationTest::testAddNotification ( )

Definition at line 43 of file GroupNotificationTestTBD.php.

References factory().

43  : void
44  {
45  $group_notification = $this->factory->standardGroup($this->id);
46  $this->assertEquals([], $group_notification->getNotifications());
47  $standard_notification = $this->factory->standard($this->id);
48  $group_notification->addNotification($standard_notification);
49  $this->assertEquals([$standard_notification], $group_notification->getNotifications());
50  $group_notification->addNotification($standard_notification);
51  $this->assertEquals([$standard_notification,$standard_notification], $group_notification->getNotifications());
52  }
factory()
+ Here is the call graph for this function:

◆ testConstructByFactory()

GroupNotificationTest::testConstructByFactory ( )

Definition at line 29 of file GroupNotificationTestTBD.php.

References factory().

29  : void
30  {
31  $group_notification = $this->factory->standardGroup($this->id);
32 
33  $this->assertInstanceOf(StandardNotificationGroup::class, $group_notification);
34  $this->assertEquals($this->id, $group_notification->getProviderIdentification());
35  }
factory()
+ Here is the call graph for this function:

◆ testGetProviderIdentification()

GroupNotificationTest::testGetProviderIdentification ( )

Tests on AbstractBaseNotification.

Definition at line 90 of file GroupNotificationTestTBD.php.

References factory().

90  : void
91  {
92  $standard_notification = $this->factory->standard($this->id);
93  $this->assertEquals($this->id, $standard_notification->getProviderIdentification());
94  }
factory()
+ Here is the call graph for this function:

◆ testGetRenderer()

GroupNotificationTest::testGetRenderer ( )

Definition at line 96 of file GroupNotificationTestTBD.php.

References factory().

96  : void
97  {
98  $group_notification = $this->factory->standardGroup($this->id);
99  $this->assertInstanceOf(
100  StandardNotificationGroupRenderer::class,
101  $group_notification->getRenderer($this->getUIFactory())
102  );
103  }
factory()
+ Here is the call graph for this function:

◆ testNewNotificationCount()

GroupNotificationTest::testNewNotificationCount ( )

Definition at line 65 of file GroupNotificationTestTBD.php.

References factory().

65  : void
66  {
67  $group_notification = $this->factory->standardGroup($this->id);
68  $this->assertEquals(0, $group_notification->getNewNotificationsCount());
69  $standard_notification = $this->factory->standard($this->id)->withNewAmount(3);
70  $group_notification->addNotification($standard_notification);
71  $this->assertEquals(3, $group_notification->getNewNotificationsCount());
72  $group_notification->addNotification($standard_notification);
73  $this->assertEquals(6, $group_notification->getNewNotificationsCount());
74  }
factory()
+ Here is the call graph for this function:

◆ testNotificationCount()

GroupNotificationTest::testNotificationCount ( )

Definition at line 54 of file GroupNotificationTestTBD.php.

References factory().

54  : void
55  {
56  $group_notification = $this->factory->standardGroup($this->id);
57  $this->assertEquals(0, $group_notification->getNotificationsCount());
58  $standard_notification = $this->factory->standard($this->id);
59  $group_notification->addNotification($standard_notification);
60  $this->assertEquals(1, $group_notification->getNotificationsCount());
61  $group_notification->addNotification($standard_notification);
62  $this->assertEquals(2, $group_notification->getNotificationsCount());
63  }
factory()
+ Here is the call graph for this function:

◆ testOldNotificationCount()

GroupNotificationTest::testOldNotificationCount ( )

Definition at line 76 of file GroupNotificationTestTBD.php.

References factory().

76  : void
77  {
78  $group_notification = $this->factory->standardGroup($this->id);
79  $this->assertEquals(0, $group_notification->getOldNotificationsCount());
80  $standard_notification = $this->factory->standard($this->id)->withOldAmount(3);
81  $group_notification->addNotification($standard_notification);
82  $this->assertEquals(3, $group_notification->getOldNotificationsCount());
83  $group_notification->addNotification($standard_notification);
84  $this->assertEquals(6, $group_notification->getOldNotificationsCount());
85  }
factory()
+ Here is the call graph for this function:

◆ testWithOpenedCallable()

GroupNotificationTest::testWithOpenedCallable ( )

Definition at line 105 of file GroupNotificationTestTBD.php.

References factory().

105  : void
106  {
107  $callable = (fn(): string => "something");
108  $standard_notification = $this->factory->standard($this->id);
109  $this->assertEquals(function (): void {
110  }, $standard_notification->getOpenedCallable());
111  $standard_notification = $standard_notification->withOpenedCallable($callable);
112  $this->assertEquals($callable, $standard_notification->getOpenedCallable());
113  }
factory()
+ Here is the call graph for this function:

◆ testWitTitle()

GroupNotificationTest::testWitTitle ( )

Definition at line 37 of file GroupNotificationTestTBD.php.

References factory().

37  : void
38  {
39  $group_notification = $this->factory->standardGroup($this->id)->withTitle("test");
40  $this->assertEquals("test", $group_notification->getTitle());
41  }
factory()
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: