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;
10 use \ILIAS\UI\Implementation\Component\Signal;
19 $this->button_factory =
new I\Component\Button\Factory();
20 $this->glyph =
new I\Component\Glyph\Glyph(
"briefcase",
"briefcase");
21 $this->icon =
new I\Component\Icon\Standard(
"someExample",
"Example",
"small",
false);
26 $this->assertInstanceOf(
27 "ILIAS\\UI\\Component\\Button\\Bulky",
28 $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de")
34 $f = $this->button_factory;
36 $f->bulky(
new StdClass(),
"",
"http://www.ilias.de");
37 $this->assertFalse(
"This should not happen");
39 $this->assertTrue(
true);
45 $f = $this->button_factory;
48 $f->bulky($icon, 1,
"http://www.ilias.de");
49 $this->assertFalse(
"This should not happen");
51 $this->assertTrue(
true);
57 $f = $this->button_factory;
60 $f->bulky($icon,
"", 1);
61 $this->assertFalse(
"This should not happen");
63 $this->assertTrue(
true);
69 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
78 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de");
87 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
88 $this->assertFalse($b->isEngaged());
90 $b = $b->withEngagedState(
true);
91 $this->assertInstanceOf(
92 "ILIAS\\UI\\Component\\Button\\Bulky",
95 $this->assertTrue($b->isEngaged());
101 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
104 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" aria-pressed="undefined">' 105 .
' <span class="glyph" aria-label="briefcase">' 106 .
' <span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span>' 108 .
' <div><span class="bulky-label">label</span></div>' 120 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de")
121 ->withEngagedState(
true);
123 .
'<button class="btn btn-bulky engaged" data-action="http://www.ilias.de" id="id_1" aria-pressed="true">' 124 .
' <span class="glyph" aria-label="briefcase">' 125 .
' <span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span>' 127 .
' <div><span class="bulky-label">label</span></div>' 139 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de");
142 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" aria-pressed="undefined">' 143 .
' <div class="icon someExample small" aria-label="Example"></div>' 144 .
' <div><span class="bulky-label">label</span></div>'
getDefaultRenderer(JavaScriptBinding $js_binding=null)
Provides common functionality for UI tests.
assertHTMLEquals($expected_html_as_string, $html_as_string)