Checks if the HTML used for the Client tests is rendered as specified.
More...
Checks if the HTML used for the Client tests is rendered as specified.
Definition at line 29 of file ItemNotificationClientHtmlTest.php.
◆ getUIFactory()
ItemNotificationClientHtmlTest::getUIFactory |
( |
| ) |
|
Definition at line 43 of file ItemNotificationClientHtmlTest.php.
References $sig_gen, ILIAS\Repository\button(), and ILIAS\Repository\symbol().
Referenced by testRenderClientHtml().
48 public function counter():
I\Counter\Factory
50 return new I\Counter\Factory();
54 return new I\Button\Factory();
56 public function symbol():
I\Symbol\Factory
58 return new I\Symbol\Factory(
59 new I\Symbol\
Icon\Factory(),
60 new I\Symbol\Glyph\Factory(),
61 new I\Symbol\Avatar\Factory()
64 public function item():
I\Item\Factory
66 return new I\Item\Factory();
68 public function mainControls():
I\MainControls\Factory
70 return new I\MainControls\Factory(
72 new I\MainControls\Slate\Factory(
button(string $caption, string $cmd)
Interface Observer Contains several chained tasks and infos about them.
◆ setUp()
ItemNotificationClientHtmlTest::setUp |
( |
| ) |
|
◆ testRenderClientHtml()
ItemNotificationClientHtmlTest::testRenderClientHtml |
( |
| ) |
|
Definition at line 85 of file ItemNotificationClientHtmlTest.php.
References Vendor\Package\$f, and getUIFactory().
88 $expected_html = file_get_contents(__DIR__ .
"/../../Client/Item/Notification/NotificationItemTest.html");
90 $icon =
$f->symbol()->icon()->standard(
"name",
"aria_label",
"small",
false);
92 $item =
$f->item()->notification(
"item title", $icon)
93 ->withCloseAction(
"close_action");
95 $item2 = $item->withDescription(
"Existing Description")
96 ->withProperties([
"Label 1" =>
"Property Value 1",
"Label 2" =>
"Property Value 2"])
97 ->withAggregateNotifications([$item]);
98 $notification_slate =
$f->mainControls()->slate()->notification(
103 $glyph =
$f->symbol()->glyph()->notification()->withCounter($this->
getUIFactory()->counter()->novelty(2));
104 $notification_center =
$f->mainControls()->slate()->combined(
"notification center", $glyph)
105 ->withAdditionalEntry($notification_slate);
107 $this->metabar =
$f->mainControls()->metaBar()->withAdditionalEntry(
"Test Slate", $notification_center);
108 $rendered_html = $this->getDefaultRenderer()->render($this->metabar);
110 $this->assertEquals($this->brutallyTrimHTML($expected_html), $this->brutallyTrimHTML($rendered_html));
◆ $metabar
C MainControls MetaBar ItemNotificationClientHtmlTest::$metabar |
|
protected |
◆ $sig_gen
ItemNotificationClientHtmlTest::$sig_gen |
|
protected |
The documentation for this class was generated from the following file: