ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
DividerTest Class Reference

Test on divider implementation. More...

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

Public Member Functions

 testImplementsFactoryInterface ()
 
 testWithLabel ()
 
 testRenderHorizontalEmpty ()
 
 testRenderHorizontalWithLabel ()
 
 testRenderVertical ()
 

Protected Member Functions

 getFactory ()
 

Detailed Description

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 testImplementsFactoryInterface(), testRenderHorizontalEmpty(), testRenderHorizontalWithLabel(), testRenderVertical(), and testWithLabel().

+ Here is the caller graph for this function:

◆ testImplementsFactoryInterface()

DividerTest::testImplementsFactoryInterface ( )

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:

◆ testRenderHorizontalEmpty()

DividerTest::testRenderHorizontalEmpty ( )

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 }
$c
Definition: deliver.php:25

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

+ Here is the call graph for this function:

◆ testRenderHorizontalWithLabel()

DividerTest::testRenderHorizontalWithLabel ( )

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, and getFactory().

+ Here is the call graph for this function:

◆ testRenderVertical()

DividerTest::testRenderVertical ( )

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, and getFactory().

+ Here is the call graph for this function:

◆ testWithLabel()

DividerTest::testWithLabel ( )

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: