ILIAS  release_7 Revision v7.30-3-g800a261c036
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)
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from BaseNotificationSetUp
 setUp ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseNotificationSetUp
 $id
 
 $provider
 
 $identification
 
 $factory
 

Detailed Description

Member Function Documentation

◆ setUp()

StandardNotificationRendererTest::setUp ( )
protected

Definition at line 32 of file StandardNotificationRendererTest.php.

32  : void
33  {
34  parent::setUp();
35  if (!defined("ILIAS_HTTP_PATH")) {
36  define("ILIAS_HTTP_PATH", "http://localhost");
37  }
38  }

◆ testConstruct()

StandardNotificationRendererTest::testConstruct ( )

Definition at line 40 of file StandardNotificationRendererTest.php.

References BaseNotificationSetUp\getUIFactory().

40  : void
41  {
42  $renderer = new StandardNotificationRenderer($this->getUIFactory());
43  $this->assertInstanceOf(StandardNotificationRenderer::class, $renderer);
44  }
+ Here is the call graph for this function:

◆ testGetNotificationComponentForItem()

StandardNotificationRendererTest::testGetNotificationComponentForItem ( )

Definition at line 47 of file StandardNotificationRendererTest.php.

References BaseNotificationSetUp\getUIFactory().

47  : void
48  {
49  $renderer = new StandardNotificationRenderer($this->getUIFactory());
50  $icon = $this->getUIFactory()->symbol()->icon()->standard("mail", "mail");
51  $item = $this->getUIFactory()->item()->notification("hello", $icon);
52 
53  $standard_notification = $this->factory->standard($this->id)->withNotificationItem($item);
54 
55  $this->assertEquals($item, $renderer->getNotificationComponentForItem($standard_notification));
56  }
+ Here is the call graph for this function:

◆ testGetNotificationComponentForItemWithCloseCallable()

StandardNotificationRendererTest::testGetNotificationComponentForItemWithCloseCallable ( )

Definition at line 59 of file StandardNotificationRendererTest.php.

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

59  : void
60  {
61  $renderer = new StandardNotificationRenderer($this->getUIFactory());
62  $icon = $this->getUIFactory()->symbol()->icon()->standard("mail", "mail");
63  $item = $this->getUIFactory()->item()->notification("hello", $icon);
64 
65  $standard_notification = $this->factory->standard($this->id)
66  ->withNotificationItem($item)
67  ->withClosedCallable(function () : void {
68  });
69 
70  $item = $item->withCloseAction("src/GlobalScreen/Client/notify.php?mode=closed&item_id=" . $this->hash($this->id->serialize()));
71  $this->assertEquals($item, $renderer->getNotificationComponentForItem($standard_notification));
72  }
+ Here is the call graph for this function:

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