ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 @inheritDoc More...
 
 setUp ()
 @inheritDoc More...
 

Additional Inherited Members

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

Detailed Description

Member Function Documentation

◆ setUp()

StandardNotificationRendererTest::setUp ( )
protected

@inheritDoc

Reimplemented from BaseNotificationSetUp.

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.

41 : void
42 {
44 $this->assertInstanceOf(StandardNotificationRenderer::class, $renderer);
45 }
$renderer

References $renderer, and BaseNotificationSetUp\getUIFactory().

+ Here is the call graph for this function:

◆ testGetNotificationComponentForItem()

StandardNotificationRendererTest::testGetNotificationComponentForItem ( )

Definition at line 48 of file StandardNotificationRendererTestTBD.php.

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 }
factory()

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

+ Here is the call graph for this function:

◆ testGetNotificationComponentForItemWithCloseCallable()

StandardNotificationRendererTest::testGetNotificationComponentForItemWithCloseCallable ( )

Definition at line 60 of file StandardNotificationRendererTestTBD.php.

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 }

References $renderer, factory(), 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: