ILIAS  release_7 Revision v7.30-3-g800a261c036
StandardNotificationGroupRendererTest.php
Go to the documentation of this file.
1<?php
2
20
21require_once(__DIR__ . "/../../BaseNotificationSetUp.php");
22
27{
28 public function testConstruct() : void
29 {
30 $renderer = new StandardNotificationGroupRenderer($this->getUIFactory());
31 $this->assertInstanceOf(StandardNotificationGroupRenderer::class, $renderer);
32 }
33
34 public function testGetNotificationComponentForItem() : void
35 {
36 $renderer = new StandardNotificationGroupRenderer($this->getUIFactory());
37 $icon = $this->getUIFactory()->symbol()->icon()->standard("mail", "mail");
38 $item = $this->getUIFactory()->item()->notification("hello", $icon);
39
40 $slate = $this->getUIFactory()->mainControls()->slate()->notification("title", [$item]);
41
42 $group_notification = $this->factory->standardGroup($this->id)->withTitle("title")->addNotification(
43 $this->factory->standard($this->id)->withNotificationItem($item)
44 );
45
46 $this->assertEquals($slate, $renderer->getNotificationComponentForItem($group_notification));
47 }
48}
Class BaseNotificationSetUp.
An exception for terminatinating execution or to throw for unit testing.