ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
StandardNotificationRendererTest Class Reference

Class StandardNotificationTest. More...

+ Inheritance diagram for StandardNotificationRendererTest:
+ Collaboration diagram for StandardNotificationRendererTest:

Public Member Functions

 testConstruct ()
 
 testGetNotificationComponentForItem ()
 
 testGetNotificationComponentForItemWithCloseCallable ()
 
- 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

Member Function Documentation

◆ testConstruct()

StandardNotificationRendererTest::testConstruct ( )

Definition at line 17 of file StandardNotificationRendererTest.php.

18 {
19 $renderer = new StandardNotificationRenderer($this->getUIFactory());
20 $this->assertInstanceOf(StandardNotificationRenderer::class, $renderer);
21 }

References BaseNotificationSetUp\getUIFactory().

+ Here is the call graph for this function:

◆ testGetNotificationComponentForItem()

StandardNotificationRendererTest::testGetNotificationComponentForItem ( )

Definition at line 24 of file StandardNotificationRendererTest.php.

25 {
26 $renderer = new StandardNotificationRenderer($this->getUIFactory());
27 $icon = $this->getUIFactory()->symbol()->icon()->standard("mail", "mail");
28 $item = $this->getUIFactory()->item()->notification("hello", $icon);
29
30 $standard_notification = $this->factory->standard($this->id)->withNotificationItem($item);
31
32 $this->assertEquals($item, $renderer->getNotificationComponentForItem($standard_notification));
33 }

References BaseNotificationSetUp\getUIFactory().

+ Here is the call graph for this function:

◆ testGetNotificationComponentForItemWithCloseCallable()

StandardNotificationRendererTest::testGetNotificationComponentForItemWithCloseCallable ( )

Definition at line 36 of file StandardNotificationRendererTest.php.

37 {
38 $renderer = new StandardNotificationRenderer($this->getUIFactory());
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)
43 ->withNotificationItem($item)
44 ->withClosedCallable(function () {
45 });
46
47 $item = $item->withCloseAction("some_path/src/GlobalScreen/Client/notify.php?mode=closed&item_id=" . $this->hash($this->id->serialize()));
48 $this->assertEquals($item, $renderer->getNotificationComponentForItem($standard_notification));
49 }

References BaseNotificationSetUp\getUIFactory(), and ILIAS\GlobalScreen\Provider\id().

+ Here is the call graph for this function:

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