Test on button implementation.
More...
Test on button implementation.
Definition at line 15 of file BulkyButtonTest.php.
◆ setUp()
BulkyButtonTest::setUp |
( |
| ) |
|
Definition at line 17 of file BulkyButtonTest.php.
19 $this->button_factory =
new I\Component\Button\Factory();
20 $this->glyph =
new I\Component\Glyph\Glyph(
"briefcase",
"briefcase");
21 $this->icon =
new I\Component\Icon\Standard(
"someExample",
"Example",
"small",
false);
◆ test_construction_action_type_wrong()
BulkyButtonTest::test_construction_action_type_wrong |
( |
| ) |
|
Definition at line 55 of file BulkyButtonTest.php.
References $f.
57 $f = $this->button_factory;
60 $f->bulky($icon,
"", 1);
61 $this->assertFalse(
"This should not happen");
63 $this->assertTrue(
true);
◆ test_construction_icon_type_wrong()
BulkyButtonTest::test_construction_icon_type_wrong |
( |
| ) |
|
Definition at line 32 of file BulkyButtonTest.php.
References $f.
34 $f = $this->button_factory;
36 $f->bulky(
new StdClass(),
"",
"http://www.ilias.de");
37 $this->assertFalse(
"This should not happen");
39 $this->assertTrue(
true);
◆ test_construction_label_type_wrong()
BulkyButtonTest::test_construction_label_type_wrong |
( |
| ) |
|
Definition at line 43 of file BulkyButtonTest.php.
References $f.
45 $f = $this->button_factory;
48 $f->bulky($icon, 1,
"http://www.ilias.de");
49 $this->assertFalse(
"This should not happen");
51 $this->assertTrue(
true);
◆ test_engaged()
BulkyButtonTest::test_engaged |
( |
| ) |
|
Definition at line 85 of file BulkyButtonTest.php.
87 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
88 $this->assertFalse($b->isEngaged());
90 $b = $b->withEngagedState(
true);
91 $this->assertInstanceOf(
92 "ILIAS\\UI\\Component\\Button\\Bulky",
95 $this->assertTrue($b->isEngaged());
◆ test_glyph_or_icon_for_glyph()
BulkyButtonTest::test_glyph_or_icon_for_glyph |
( |
| ) |
|
Definition at line 67 of file BulkyButtonTest.php.
69 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
◆ test_glyph_or_icon_for_icon()
BulkyButtonTest::test_glyph_or_icon_for_icon |
( |
| ) |
|
Definition at line 76 of file BulkyButtonTest.php.
78 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de");
◆ test_implements_factory_interface()
BulkyButtonTest::test_implements_factory_interface |
( |
| ) |
|
Definition at line 24 of file BulkyButtonTest.php.
26 $this->assertInstanceOf(
27 "ILIAS\\UI\\Component\\Button\\Bulky",
28 $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de")
◆ test_render_with_glyph_in_context()
BulkyButtonTest::test_render_with_glyph_in_context |
( |
| ) |
|
Definition at line 98 of file BulkyButtonTest.php.
References $r, ILIAS_UI_TestBase\assertHTMLEquals(), and ILIAS_UI_TestBase\getDefaultRenderer().
101 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
104 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" aria-pressed="undefined">' 105 .
' <span class="glyph" aria-label="briefcase">' 106 .
' <span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span>' 108 .
' <div><span class="bulky-label">label</span></div>' getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_with_glyph_in_context_and_engaged()
BulkyButtonTest::test_render_with_glyph_in_context_and_engaged |
( |
| ) |
|
Definition at line 117 of file BulkyButtonTest.php.
References $r, ILIAS_UI_TestBase\assertHTMLEquals(), and ILIAS_UI_TestBase\getDefaultRenderer().
120 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de")
121 ->withEngagedState(
true);
123 .
'<button class="btn btn-bulky engaged" data-action="http://www.ilias.de" id="id_1" aria-pressed="true">' 124 .
' <span class="glyph" aria-label="briefcase">' 125 .
' <span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span>' 127 .
' <div><span class="bulky-label">label</span></div>' getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
◆ test_render_with_icon()
BulkyButtonTest::test_render_with_icon |
( |
| ) |
|
Definition at line 136 of file BulkyButtonTest.php.
References $r, ILIAS_UI_TestBase\assertHTMLEquals(), and ILIAS_UI_TestBase\getDefaultRenderer().
139 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de");
142 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" aria-pressed="undefined">' 143 .
' <div class="icon someExample small" aria-label="Example"></div>' 144 .
' <div><span class="bulky-label">label</span></div>' getDefaultRenderer(JavaScriptBinding $js_binding=null)
assertHTMLEquals($expected_html_as_string, $html_as_string)
The documentation for this class was generated from the following file: