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\Divider\Factory();
41 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Divider\\Horizontal",
$f->horizontal());
47 $c =
$f->horizontal()->withLabel(
"label");
49 $this->assertEquals(
"label",
$c->getLabel());
55 $r = $this->getDefaultRenderer();
57 $c =
$f->horizontal();
59 $html = trim(
$r->render(
$c));
61 $expected_html =
"<hr/>";
63 $this->assertHTMLEquals($expected_html, $html);
69 $r = $this->getDefaultRenderer();
71 $c =
$f->horizontal()->withLabel(
"label");
73 $html = trim(
$r->render(
$c));
74 $expected_html =
'<hr class="il-divider-with-label" /><h4 class="il-divider">label</h4>';
76 $this->assertHTMLEquals(
"<div>" . $expected_html .
"</div>",
"<div>" . $html .
"</div>");
82 $r = $this->getDefaultRenderer();
86 $html = trim(
$r->render(
$c));
87 $expected_html =
'<span class="glyphicon il-divider-vertical" aria-hidden="true"></span>';
89 $this->assertHTMLEquals(
"<div>" . $expected_html .
"</div>",
"<div>" . $html .
"</div>");
testImplementsFactoryInterface()
testRenderHorizontalEmpty()
testRenderHorizontalWithLabel()
Test on divider implementation.