5require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
6require_once(__DIR__ .
"/../../Base.php");
8use \ILIAS\UI\Component\Link as
C;
9use \ILIAS\UI\Implementation\Component as I;
18 $this->factory =
new I\Link\Factory();
19 $this->glyph =
new I\Symbol\Glyph\Glyph(
"briefcase",
"briefcase");
20 $this->icon =
new I\Symbol\Icon\Standard(
"someExample",
"Example",
"small",
false);
21 $this->target = new \ILIAS\Data\URI(
"http://www.ilias.de");
26 $link = $this->factory->bulky($this->glyph,
"label", $this->target);
27 $this->assertInstanceOf(
C\Bulky::class, $link);
28 $this->assertInstanceOf(
C\Link::class, $link);
33 $this->expectException(\TypeError::class);
34 $link = $this->factory->bulky(
'wrong param',
"label", $this->target);
39 $label =
'some label for the link';
40 $link = $this->factory->bulky($this->glyph, $label, $this->target);
41 $this->assertEquals($label, $link->getLabel());
46 $link = $this->factory->bulky($this->glyph,
"label", $this->target);
47 $this->assertEquals($this->glyph, $link->getSymbol());
48 $link = $this->factory->bulky($this->icon,
"label", $this->target);
49 $this->assertEquals($this->icon, $link->getSymbol());
55 $b = $this->factory->bulky($this->glyph,
"label", $this->target);
58 .
'<a class="il-link link-bulky" href="http://www.ilias.de">'
59 .
' <span class="glyph" aria-label="briefcase">'
60 .
' <span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span>'
62 .
' <span class="bulky-label">label</span>'
74 $b = $this->factory->bulky($this->icon,
"label", $this->target);
77 .
'<a class="il-link link-bulky" href="http://www.ilias.de">'
78 .
' <div class="icon someExample small" aria-label="Example"></div>'
79 .
' <span class="bulky-label">label</span>'
90 $b = $this->factory->bulky($this->icon,
"label", $this->target)
91 ->withAdditionalOnloadCode(
function ($id) {
96 .
'<a class="il-link link-bulky" href="http://www.ilias.de" id="id_1">'
97 .
' <div class="icon someExample small" aria-label="Example"></div>'
98 .
' <span class="bulky-label">label</span>'
Testing behavior of the Bulky Link.
testImplementsInterfaces()
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)