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;
 
   22        return new I\Component\Item\Factory();
 
   29        $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Item\\Standard", 
$f->standard(
"title"));
 
   35        $c = 
$f->standard(
"title");
 
   37        $this->assertEquals(
$c->getTitle(), 
"title");
 
   44        $c = 
$f->standard(
"title")->withDescription(
"description");
 
   46        $this->assertEquals(
$c->getDescription(), 
"description");
 
   53        $props = array(
"prop1" => 
"val1", 
"prop2" => 
"val2");
 
   54        $c = 
$f->standard(
"title")->withProperties($props);
 
   56        $this->assertEquals(
$c->getProperties(), $props);
 
   63        $actions = 
new I\Component\Dropdown\Standard(array(
 
   64            new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"),
 
   65            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")
 
   67        $c = 
$f->standard(
"title")->withActions($actions);
 
   69        $this->assertEquals(
$c->getActions(), $actions);
 
   75        $df = new \ILIAS\Data\Factory();
 
   77        $color = $df->color(
'#ff00ff');
 
   79        $c = 
$f->standard(
"title")->withColor($color);
 
   81        $this->assertEquals(
$c->getColor(), $color);
 
   88        $image = 
new I\Component\Image\Image(
"standard", 
"src", 
"str");
 
   90        $c = 
$f->standard(
"title")->withLeadImage($image);
 
   92        $this->assertEquals(
$c->getLead(), $image);
 
   99        $icon = 
new I\Component\Icon\Standard(
"name", 
"aria_label", 
"small", 
false);
 
  101        $c = 
$f->standard(
"title")->withLeadIcon($icon);
 
  103        $this->assertEquals(
$c->getLead(), $icon);
 
  110        $c = 
$f->standard(
"title")->withLeadText(
"text");
 
  112        $this->assertEquals(
$c->getLead(), 
"text");
 
  119        $c = 
$f->standard(
"title")->withLeadText(
"text")->withNoLead();
 
  121        $this->assertEquals(
$c->getLead(), 
null);
 
  129        $actions = 
new I\Component\Dropdown\Standard(array(
 
  130            new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"),
 
  131            new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")
 
  133        $c = 
$f->standard(
"Item Title")
 
  134            ->withActions($actions)
 
  135            ->withProperties(array(
 
  136                "Origin" => 
"Course Title 1",
 
  137                "Last Update" => 
"24.11.2011",
 
  138                "Location" => 
"Room 123, Main Street 44, 3012 Bern"))
 
  139            ->withDescription(
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
 
  144<div 
class=
"il-item il-std-item ">
 
  146                        <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>
 
  147<ul 
class=
"dropdown-menu">
 
  148        <li><button 
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_1"  >
ILIAS</button>
 
  150        <li><button 
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_2"  >GitHub</button>
 
  154                        <div 
class=
"il-item-description">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</div>
 
  155                        <hr 
class=
"il-item-divider" />
 
  157                                <div 
class=
"col-md-6">
 
  159                                                <div 
class=
"col-sm-5 col-lg-4 il-item-property-name">Origin</div>
 
  160                                                <div 
class=
"col-sm-7 col-lg-8 il-item-property-value il-multi-line-cap-3">Course 
Title 1</div>
 
  163                                <div 
class=
"col-md-6">
 
  165                                                <div 
class=
"col-sm-5 col-lg-4 il-item-property-name">Last Update</div>
 
  166                                                <div 
class=
"col-sm-7 col-lg-8 il-item-property-value il-multi-line-cap-3">24.11.2011</div>
 
  171                                <div 
class=
"col-md-6">
 
  173                                                <div 
class=
"col-sm-5 col-lg-4 il-item-property-name">Location</div>
 
  174                                                <div 
class=
"col-sm-7 col-lg-8 il-item-property-value il-multi-line-cap-3">Room 123, Main Street 44, 3012 Bern</div>
 
  177                                <div 
class=
"col-md-6">
 
  179                                                <div 
class=
"col-sm-5 col-lg-4 il-item-property-name"></div>
 
  180                                                <div 
class=
"col-sm-7 col-lg-8 il-item-property-value il-multi-line-cap-3"></div>
 
  195        $image = 
new I\Component\Image\Image(
"standard", 
"src", 
"str");
 
  197        $c = 
$f->standard(
"title")->withLeadImage($image);
 
  201<div 
class=
"il-item il-std-item ">
 
  203                <div 
class=
"col-sm-3">
 
  204                        <img src=
"src" class=
"img-standard" alt=
"str" />
 
  206                <div 
class=
"col-sm-9">
 
  221        $icon = 
new I\Component\Icon\Standard(
"name", 
"aria_label", 
"small", 
false);
 
  223        $c = 
$f->standard(
"title")->withLeadIcon($icon);
 
  227<div 
class=
"il-item il-std-item ">
 
  229                <div 
class=
"media-left">
 
  230                        <div 
class=
"icon name small" aria-label=
"aria_label"></div></div>
 
  231                <div 
class=
"media-body">                
 
  245        $df = new \ILIAS\Data\Factory();
 
  247        $color = $df->color(
'#ff00ff');
 
  249        $c = 
$f->standard(
"title")->withColor($color)->withLeadText(
"lead");
 
  254<div 
class=
"il-item il-std-item il-item-marker " style=
"border-color:#ff00ff">
 
  256                <div 
class=
"col-sm-3">
 
  259                <div 
class=
"col-sm-9">
 
  273        $df = new \ILIAS\Data\Factory();
 
  275        $color = $df->color(
'#ff00ff');
 
  277        $c = 
$f->standard(
new I\Component\
Button\Shy(
"ILIAS", 
"https://www.ilias.de"))
 
  278            ->withProperties(array(
"test" => 
new I\Component\
Button\Shy(
"GitHub", 
"https://www.github.com")));
 
  282<div 
class=
"il-item il-std-item ">
 
  283                        <h5><button 
class=
"btn btn-link" data-action=
"https://www.ilias.de" id=
"id_2"  >
ILIAS</button>
 
  285                        <hr 
class=
"il-item-divider" />
 
  287                                <div 
class=
"col-md-6">
 
  289                                                <div 
class=
"col-sm-5 col-lg-4 il-item-property-name">
test</div>
 
  290                                                <div 
class=
"col-sm-7 col-lg-8 il-item-property-value il-multi-line-cap-3"><button 
class=
"btn btn-link" data-action=
"https://www.github.com" id=
"id_1">GitHub</button></div>
 
  293                                <div 
class=
"col-md-6">
 
  295                                                <div 
class=
"col-sm-5 col-lg-4 il-item-property-name"></div>
 
  296                                                <div 
class=
"col-sm-7 col-lg-8 il-item-property-value il-multi-line-cap-3"></div>
 
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)
getDefaultRenderer(JavaScriptBinding $js_binding=null)
test_render_lead_text_and_color()
test_implements_factory_interface()
test_shy_title_and_property()