ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 ()
 
- 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.

References BaseNotificationSetUp\getUIFactory().

18  {
19  $renderer = new StandardNotificationRenderer($this->getUIFactory());
20  $this->assertInstanceOf(StandardNotificationRenderer::class, $renderer);
21  }
+ Here is the call graph for this function:

◆ testGetNotificationComponentForItem()

StandardNotificationRendererTest::testGetNotificationComponentForItem ( )

Definition at line 24 of file StandardNotificationRendererTest.php.

References BaseNotificationSetUp\getUIFactory().

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  }
+ Here is the call graph for this function:

◆ testGetNotificationComponentForItemWithCloseCallable()

StandardNotificationRendererTest::testGetNotificationComponentForItemWithCloseCallable ( )

Definition at line 36 of file StandardNotificationRendererTest.php.

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

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  }
+ Here is the call graph for this function:

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