ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
DividerTest Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for DividerTest:
+ Collaboration diagram for DividerTest:

Public Member Functions

 test_implements_factory_interface ()
 
 test_with_label ()
 
 test_render_horizontal_empty ()
 
 test_render_horizontal_with_label ()
 
 test_render_vertical ()
 
- Public Member Functions inherited from ILIAS_UI_TestBase
 setUp ()
 
 tearDown ()
 
 getUIFactory ()
 
 getTemplateFactory ()
 
 getResourceRegistry ()
 
 getLanguage ()
 
 getJavaScriptBinding ()
 
 getRefinery ()
 
 getImagePathResolver ()
 
 getDataFactory ()
 
 getDefaultRenderer (JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
 
 getDecoratedRenderer (Renderer $default)
 
 normalizeHTML (string $html)
 
 assertHTMLEquals (string $expected_html_as_string, string $html_as_string)
 

Protected Member Functions

 getFactory ()
 
- Protected Member Functions inherited from ILIAS_UI_TestBase
 brutallyTrimHTML (string $html)
 A more radical version of normalizeHTML. More...
 
 brutallyTrimSignals (string $html)
 A naive replacement of all il_signal-ids with dots to ease comparisons of rendered output. More...
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Test on divider implementation.

Definition at line 30 of file DividerTest.php.

Member Function Documentation

◆ getFactory()

DividerTest::getFactory ( )
protected

Definition at line 32 of file DividerTest.php.

32 : C\Divider\Factory
33 {
34 return new I\Component\Divider\Factory();
35 }

Referenced by test_implements_factory_interface(), test_render_horizontal_empty(), test_render_horizontal_with_label(), test_render_vertical(), and test_with_label().

+ Here is the caller graph for this function:

◆ test_implements_factory_interface()

DividerTest::test_implements_factory_interface ( )

Definition at line 37 of file DividerTest.php.

37 : void
38 {
39 $f = $this->getFactory();
40
41 $this->assertInstanceOf("ILIAS\\UI\\Component\\Divider\\Horizontal", $f->horizontal());
42 }

References Vendor\Package\$f, and getFactory().

+ Here is the call graph for this function:

◆ test_render_horizontal_empty()

DividerTest::test_render_horizontal_empty ( )

Definition at line 52 of file DividerTest.php.

52 : void
53 {
54 $f = $this->getFactory();
55 $r = $this->getDefaultRenderer();
56
57 $c = $f->horizontal();
58
59 $html = trim($r->render($c));
60
61 $expected_html = "<hr/>";
62
63 $this->assertHTMLEquals($expected_html, $html);
64 }
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
Definition: Base.php:427
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
Definition: Base.php:355
$c
Definition: cli.php:38

References $c, Vendor\Package\$f, ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().

+ Here is the call graph for this function:

◆ test_render_horizontal_with_label()

DividerTest::test_render_horizontal_with_label ( )

Definition at line 66 of file DividerTest.php.

66 : void
67 {
68 $f = $this->getFactory();
69 $r = $this->getDefaultRenderer();
70
71 $c = $f->horizontal()->withLabel("label");
72
73 $html = trim($r->render($c));
74 $expected_html = '<hr class="il-divider-with-label" /><h4 class="il-divider">label</h4>';
75
76 $this->assertHTMLEquals("<div>" . $expected_html . "</div>", "<div>" . $html . "</div>");
77 }

References $c, Vendor\Package\$f, ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().

+ Here is the call graph for this function:

◆ test_render_vertical()

DividerTest::test_render_vertical ( )

Definition at line 79 of file DividerTest.php.

79 : void
80 {
81 $f = $this->getFactory();
82 $r = $this->getDefaultRenderer();
83
84 $c = $f->vertical();
85
86 $html = trim($r->render($c));
87 $expected_html = '<span class="glyphicon il-divider-vertical" aria-hidden="true"></span>';
88
89 $this->assertHTMLEquals("<div>" . $expected_html . "</div>", "<div>" . $html . "</div>");
90 }

References $c, Vendor\Package\$f, ILIAS_UI_TestBase\assertHTMLEquals(), ILIAS_UI_TestBase\getDefaultRenderer(), and getFactory().

+ Here is the call graph for this function:

◆ test_with_label()

DividerTest::test_with_label ( )

Definition at line 44 of file DividerTest.php.

44 : void
45 {
46 $f = $this->getFactory();
47 $c = $f->horizontal()->withLabel("label");
48
49 $this->assertEquals("label", $c->getLabel());
50 }

References $c, Vendor\Package\$f, and getFactory().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: