ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

Referenced by testImplementsFactoryInterface(), testRenderHorizontalEmpty(), testRenderHorizontalWithLabel(), testRenderVertical(), and testWithLabel().

32  : C\Divider\Factory
33  {
34  return new I\Component\Divider\Factory();
35  }
+ Here is the caller graph for this function:

◆ testImplementsFactoryInterface()

DividerTest::testImplementsFactoryInterface ( )

Definition at line 37 of file DividerTest.php.

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

37  : void
38  {
39  $f = $this->getFactory();
40 
41  $this->assertInstanceOf("ILIAS\\UI\\Component\\Divider\\Horizontal", $f->horizontal());
42  }
+ Here is the call graph for this function:

◆ testRenderHorizontalEmpty()

DividerTest::testRenderHorizontalEmpty ( )

Definition at line 52 of file DividerTest.php.

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

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
$r
+ Here is the call graph for this function:

◆ testRenderHorizontalWithLabel()

DividerTest::testRenderHorizontalWithLabel ( )

Definition at line 66 of file DividerTest.php.

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

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  }
$c
Definition: deliver.php:25
$r
+ Here is the call graph for this function:

◆ testRenderVertical()

DividerTest::testRenderVertical ( )

Definition at line 79 of file DividerTest.php.

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

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  }
$c
Definition: deliver.php:25
$r
+ Here is the call graph for this function:

◆ testWithLabel()

DividerTest::testWithLabel ( )

Definition at line 44 of file DividerTest.php.

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

44  : void
45  {
46  $f = $this->getFactory();
47  $c = $f->horizontal()->withLabel("label");
48 
49  $this->assertEquals("label", $c->getLabel());
50  }
$c
Definition: deliver.php:25
+ Here is the call graph for this function:

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