19 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../../../vendor/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../Base.php");
34 return new I\Component\Chart\Factory(
35 $this->createMock(
I\
Component\Chart\ProgressMeter\Factory::class),
36 $this->createMock(
I\
Component\Chart\Bar\Factory::class)
44 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Chart\\ScaleBar",
$f->scaleBar(array(
"1" =>
false)));
58 $c =
$f->scaleBar($items);
60 $this->assertEquals(
$c->getItems(), $items);
66 $r = $this->getDefaultRenderer();
75 $c =
$f->scaleBar($items);
77 $html =
$r->render(
$c);
79 $expected_html = <<<EOT
80 <ul
class=
"il-chart-scale-bar">
81 <li style=
"width:25%">
82 <div
class=
"il-chart-scale-bar-item ">
86 <li style=
"width:25%">
87 <div
class=
"il-chart-scale-bar-item ">
91 <li style=
"width:25%">
92 <div
class=
"il-chart-scale-bar-item il-chart-scale-bar-active">
93 Medium <span
class=
"sr-only">(active)</span>
96 <li style=
"width:25%">
97 <div
class=
"il-chart-scale-bar-item ">
104 $this->assertHTMLEquals($expected_html, $html);
testImplementsFactoryInterface()