ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 33 of file StandardNotificationRendererTestTBD.php.

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

◆ testConstruct()

StandardNotificationRendererTest::testConstruct ( )

Definition at line 41 of file StandardNotificationRendererTestTBD.php.

References $renderer, and BaseNotificationSetUp\getUIFactory().

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

◆ testGetNotificationComponentForItem()

StandardNotificationRendererTest::testGetNotificationComponentForItem ( )

Definition at line 48 of file StandardNotificationRendererTestTBD.php.

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

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

◆ testGetNotificationComponentForItemWithCloseCallable()

StandardNotificationRendererTest::testGetNotificationComponentForItemWithCloseCallable ( )

Definition at line 60 of file StandardNotificationRendererTestTBD.php.

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

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

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