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 $c =
$f->standard(array(
46 $items =
$c->getItems();
48 $this->assertTrue(is_array($items));
49 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Shy", $items[0]);
50 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Divider\\Horizontal", $items[2]);
58 $c =
$f->standard(array());
63 $this->assertEquals($expected,
$html);
71 $c =
$f->standard(array(
80 <div
class=
"dropdown">
81 <button
class=
"btn btn-default dropdown-toggle" type=
"button" data-toggle=
"dropdown" aria-label=
"actions" aria-haspopup=
"true" aria-expanded=
"false">
82 <span
class=
"caret"></span>
84 <ul
class=
"dropdown-menu">
85 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
87 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
100 $c =
$f->standard(array(
104 ))->withLabel(
"label");
109 <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>
110 <ul
class=
"dropdown-menu">
111 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
113 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
126 $c =
$f->standard(array(
130 ))->withLabel(
"label")->withAriaLabel(
"my_aria_label");
135 <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>
136 <ul
class=
"dropdown-menu">
137 <li><button
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1">
ILIAS</button></li>
139 <li><button
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2">GitHub</button></li>
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_implements_factory_interface()