5require_once(
"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 \ILIAS\UI\Implementation\Factory(
19 $this->createMock(
C\Counter\Factory::class),
20 $this->createMock(
C\Glyph\Factory::class),
21 $this->createMock(
C\
Button\Factory::class),
22 $this->createMock(
C\Listing\Factory::class),
23 $this->createMock(
C\Image\Factory::class),
24 $this->createMock(
C\Panel\Factory::class),
25 $this->createMock(
C\Modal\Factory::class),
26 $this->createMock(
C\Dropzone\Factory::class),
27 $this->createMock(
C\Popover\Factory::class),
28 $this->createMock(
C\Divider\Factory::class),
29 $this->createMock(
C\Link\Factory::class),
30 $this->createMock(
C\Dropdown\Factory::class),
31 $this->createMock(
C\Item\Factory::class),
32 $this->createMock(
C\Icon\Factory::class),
33 $this->createMock(
C\ViewControl\Factory::class),
34 $this->createMock(
C\Chart\Factory::class),
35 $this->createMock(
C\Input\Factory::class),
36 $this->createMock(
C\Table\Factory::class),
37 $this->createMock(
C\MessageBox\Factory::class),
38 $this->createMock(
C\Card\Factory::class)
45 $c =
$f->Breadcrumbs(array());
47 $this->assertInstanceOf(
"ILIAS\\UI\\Factory",
$f);
48 $this->assertInstanceOf(
49 "ILIAS\\UI\\Component\\Breadcrumbs\\Breadcrumbs",
50 $f->Breadcrumbs(array())
58 new I\Component\Link\Standard(
"label",
'#'),
59 new I\Component\Link\Standard(
"label2",
'#')
62 $c =
$f->Breadcrumbs($crumbs);
63 $this->assertEquals($crumbs,
$c->getItems());
69 $crumb =
new I\Component\Link\Standard(
"label2",
'#');
71 $c =
$f->Breadcrumbs(array())
72 ->withAppendedItem($crumb);
73 $this->assertEquals(array($crumb),
$c->getItems());
82 new I\Component\Link\Standard(
"label",
'#'),
83 new I\Component\Link\Standard(
"label2",
'#')
85 $c =
$f->Breadcrumbs($crumbs);
88 $expected =
'<nav role="navigation" aria-label="breadcrumbs">'
89 .
' <ul class="breadcrumb">'
90 .
' <li class="crumb">'
91 .
' <a href="#">label</a>'
93 .
' <li class="crumb">'
94 .
' <a href="#">label2</a>'
Tests for the Breadcrumbs-component.
test_implements_factory_interface()
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)