5require_once(__DIR__ . 
"/../../../../libs/composer/vendor/autoload.php");
 
    6require_once(__DIR__ . 
"/../../Base.php");
 
    8use \ILIAS\UI\Component as 
C;
 
    9use \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(
 
   41            new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"),
 
   42            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com"),
 
   43            new I\Component\Divider\Horizontal(),
 
   44            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")
 
   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(
 
   72            new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"),
 
   73            new I\Component\Divider\Horizontal(),
 
   74            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")
 
   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(
 
  101            new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"),
 
  102            new I\Component\Divider\Horizontal(),
 
  103            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")
 
  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(
 
  127            new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"),
 
  128            new I\Component\Divider\Horizontal(),
 
  129            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")
 
  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>
 
An exception for terminatinating execution or to throw for unit testing.
Test on card implementation.
test_render_items_with_label()
test_implements_factory_interface()
test_render_items_with_aria_label()
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null)