5 require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
6 require_once(__DIR__ .
"/../../Base.php");
8 use \ILIAS\UI\Component as
C;
9 use \ILIAS\UI\Implementation as
I;
18 return new I\Component\Dropdown\Factory();
25 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Dropdown\\Standard",
$f->standard(array()));
32 $c =
$f->standard(array())->withLabel(
"label");
34 $this->assertEquals(
$c->getLabel(),
"label");
40 $link =
new I\Component\Link\Standard(
"Link to Github",
"http://www.github.com");
41 $c =
$f->standard(array(
45 $link->withOpenInNewViewport(
true)
47 $items =
$c->getItems();
49 $this->assertTrue(is_array($items));
50 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Shy", $items[0]);
51 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Divider\\Horizontal", $items[2]);
52 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Link\\Standard", $items[3]);
60 $c =
$f->standard(array());
62 $html = $r->render(
$c);
65 $this->assertEquals($expected, $html);
73 $c =
$f->standard(array(
79 $html = $r->render(
$c);
82 <div
class=
"dropdown">
83 <button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false">
84 <span
class=
"caret"></span>
86 <ul
class=
"dropdown-menu">
87 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
89 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
102 $c =
$f->standard(array(
106 ))->withLabel(
"label");
108 $html = $r->render(
$c);
111 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-haspopup=
"true" aria-expanded=
"false">label <span
class=
"caret"></span></button>
112 <ul
class=
"dropdown-menu">
113 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
115 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
128 $link =
new I\Component\Link\Standard(
"Link to ILIAS",
"http://www.ilias.de");
130 $c =
$f->standard(array(
131 $link->withOpenInNewViewport(
true)
134 $html = $r->render(
$c);
137 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false"><span
class=
"caret"></span></button>
138 <ul
class=
"dropdown-menu">
139 <li><a href=
"http://www.ilias.de" target=
"_blank" rel=
"noopener">Link to
ILIAS</a></li>
152 $c =
$f->standard(array(
156 ))->withLabel(
"label")->withAriaLabel(
"my_aria_label");
158 $html = $r->render(
$c);
161 <div
class=
"dropdown"><button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"my_aria_label" aria-haspopup=
"true" aria-expanded=
"false">label <span
class=
"caret"></span></button>
162 <ul
class=
"dropdown-menu">
163 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
165 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
Class ChatMainBarProvider .
getDefaultRenderer(JavaScriptBinding $js_binding=null)
test_render_items_with_label()
test_render_items_with_aria_label()
Provides common functionality for UI tests.
Test on card implementation.
assertHTMLEquals($expected_html_as_string, $html_as_string)
test_render_with_link_new_viewport()
test_implements_factory_interface()