ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StandardNotificationTest Class Reference

Class StandardNotificationTest. More...

+ Inheritance diagram for StandardNotificationTest:
+ Collaboration diagram for StandardNotificationTest:

Public Member Functions

 testConstructByFactory ()
 
 testWithNotificationItem ()
 
 testWithNewAmout ()
 
 testWithOldAmout ()
 
 testGetProviderIdentification ()
 Tests on AbstractBaseNotification. More...
 
 testGetRenderer ()
 
 testWithOpenedCallable ()
 
 testWithClosedCallable ()
 
 testHasClosedCallable ()
 
- Public Member Functions inherited from BaseNotificationSetUp
 getUIFactory ()
 
 getDIC ()
 
 getDummyNotificationsProviderWithNotifications ($notifications)
 

Additional Inherited Members

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

Detailed Description

Class StandardNotificationTest.

Definition at line 27 of file StandardNotificationTestTBD.php.

Member Function Documentation

◆ testConstructByFactory()

StandardNotificationTest::testConstructByFactory ( )

Definition at line 29 of file StandardNotificationTestTBD.php.

29 : void
30 {
31 $standard_notification = $this->factory->standard($this->id);
32
33 $this->assertInstanceOf(StandardNotification::class, $standard_notification);
34 $this->assertEquals($this->id, $standard_notification->getProviderIdentification());
35 }
factory()

References factory().

+ Here is the call graph for this function:

◆ testGetProviderIdentification()

StandardNotificationTest::testGetProviderIdentification ( )

Tests on AbstractBaseNotification.

Definition at line 67 of file StandardNotificationTestTBD.php.

67 : void
68 {
69 $standard_notification = $this->factory->standard($this->id);
70 $this->assertEquals($this->id, $standard_notification->getProviderIdentification());
71 }

References factory().

+ Here is the call graph for this function:

◆ testGetRenderer()

StandardNotificationTest::testGetRenderer ( )

Definition at line 73 of file StandardNotificationTestTBD.php.

73 : void
74 {
75 $standard_notification = $this->factory->standard($this->id);
76 $this->assertInstanceOf(
77 StandardNotificationRenderer::class,
78 $standard_notification->getRenderer($this->getUIFactory())
79 );
80 }

References factory().

+ Here is the call graph for this function:

◆ testHasClosedCallable()

StandardNotificationTest::testHasClosedCallable ( )

Definition at line 99 of file StandardNotificationTestTBD.php.

99 : void
100 {
101 $callable = (fn(): string => "something");
102 $standard_notification = $this->factory->standard($this->id);
103 $this->assertFalse($standard_notification->hasClosedCallable());
104 $standard_notification = $standard_notification->withClosedCallable($callable);
105 $this->assertTrue($standard_notification->hasClosedCallable());
106 }

References factory().

+ Here is the call graph for this function:

◆ testWithClosedCallable()

StandardNotificationTest::testWithClosedCallable ( )

Definition at line 91 of file StandardNotificationTestTBD.php.

91 : void
92 {
93 $callable = (fn(): string => "something");
94 $standard_notification = $this->factory->standard($this->id);
95 $this->assertNull($standard_notification->getClosedCallable());
96 $standard_notification = $standard_notification->withClosedCallable($callable);
97 $this->assertEquals($callable, $standard_notification->getClosedCallable());
98 }

References factory().

+ Here is the call graph for this function:

◆ testWithNewAmout()

StandardNotificationTest::testWithNewAmout ( )

Definition at line 46 of file StandardNotificationTestTBD.php.

46 : void
47 {
48 $standard_notification = $this->factory->standard($this->id);
49
50 $this->assertEquals(1, $standard_notification->getNewAmount());
51 $standard_notification = $standard_notification->withNewAmount(13);
52 $this->assertEquals(13, $standard_notification->getNewAmount());
53 }

References factory().

+ Here is the call graph for this function:

◆ testWithNotificationItem()

StandardNotificationTest::testWithNotificationItem ( )

Definition at line 37 of file StandardNotificationTestTBD.php.

37 : void
38 {
39 $icon = $this->getUIFactory()->symbol()->icon()->standard("mail", "mail");
40 $item = $this->getUIFactory()->item()->notification("hello", $icon);
41
42 $standard_notification = $this->factory->standard($this->id)->withNotificationItem($item);
43 $this->assertEquals($item, $standard_notification->getNotificationItem());
44 }

References factory(), and BaseNotificationSetUp\getUIFactory().

+ Here is the call graph for this function:

◆ testWithOldAmout()

StandardNotificationTest::testWithOldAmout ( )

Definition at line 55 of file StandardNotificationTestTBD.php.

55 : void
56 {
57 $standard_notification = $this->factory->standard($this->id);
58
59 $this->assertEquals(0, $standard_notification->getOldAmount());
60 $standard_notification = $standard_notification->withOldAmount(13);
61 $this->assertEquals(13, $standard_notification->getOldAmount());
62 }

References factory().

+ Here is the call graph for this function:

◆ testWithOpenedCallable()

StandardNotificationTest::testWithOpenedCallable ( )

Definition at line 82 of file StandardNotificationTestTBD.php.

82 : void
83 {
84 $callable = (fn(): string => "something");
85 $standard_notification = $this->factory->standard($this->id);
86 $this->assertEquals(function (): void {
87 }, $standard_notification->getOpenedCallable());
88 $standard_notification = $standard_notification->withOpenedCallable($callable);
89 $this->assertEquals($callable, $standard_notification->getOpenedCallable());
90 }

References factory().

+ Here is the call graph for this function:

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