19use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
22require_once(__DIR__ .
"/../../BaseNotificationSetUp.php");
33 protected function setUp(): void
36 if (!defined(
"ILIAS_HTTP_PATH")) {
37 define(
"ILIAS_HTTP_PATH",
"http://localhost");
44 $this->assertInstanceOf(StandardNotificationRenderer::class,
$renderer);
51 $icon = $this->
getUIFactory()->symbol()->icon()->standard(
"mail",
"mail");
52 $item = $this->
getUIFactory()->item()->notification(
"hello", $icon);
54 $standard_notification = $this->
factory->standard($this->
id)->withNotificationItem($item);
56 $this->assertEquals($item,
$renderer->getNotificationComponentForItem($standard_notification));
63 $icon = $this->
getUIFactory()->symbol()->icon()->standard(
"mail",
"mail");
64 $item = $this->
getUIFactory()->item()->notification(
"hello", $icon);
66 $standard_notification = $this->
factory->standard($this->
id)
67 ->withNotificationItem($item)
68 ->withClosedCallable(
function ():
void {
71 $item = $item->withCloseAction(
"notify.php?mode=closed&item_id=" . $this->hash($this->
id->serialize()));
72 $this->assertEquals($item,
$renderer->getNotificationComponentForItem($standard_notification));
Class BaseNotificationSetUp.
Class StandardNotificationGroupRenderer.
Class StandardNotificationTest.
testGetNotificationComponentForItem()
testGetNotificationComponentForItemWithCloseCallable()