Test on button implementation.
More...
Test on button implementation.
Definition at line 30 of file BulkyButtonTest.php.
◆ getHtmlWithGlyph()
BulkyButtonTest::getHtmlWithGlyph |
( |
bool |
$engeagable = false , |
|
|
bool |
$engeaged = false |
|
) |
| |
|
protected |
◆ setUp()
BulkyButtonTest::setUp |
( |
| ) |
|
Definition at line 36 of file BulkyButtonTest.php.
38 $this->button_factory =
new I\Component\Button\Factory();
39 $this->glyph =
new I\Component\Symbol\Glyph\Glyph(
"briefcase",
"briefcase");
40 $this->icon =
new I\Component\Symbol\Icon\Standard(
"someExample",
"Example",
"small",
false);
◆ testEngageableDisengaged()
BulkyButtonTest::testEngageableDisengaged |
( |
| ) |
|
Definition at line 94 of file BulkyButtonTest.php.
References Vendor\Package\$b.
96 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
97 $this->assertFalse(
$b->isEngaged());
98 $this->assertFalse(
$b->isEngageable());
100 $b = $b->withEngagedState(
false);
101 $this->assertInstanceOf(
102 "ILIAS\\UI\\Component\\Button\\Bulky",
105 $this->assertFalse($b->isEngaged());
106 $this->assertTrue($b->isEngageable());
◆ testEngaged()
BulkyButtonTest::testEngaged |
( |
| ) |
|
Definition at line 79 of file BulkyButtonTest.php.
References Vendor\Package\$b.
81 $b = $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de");
82 $this->assertFalse(
$b->isEngaged());
83 $this->assertFalse(
$b->isEngageable());
85 $b = $b->withEngagedState(
true);
86 $this->assertInstanceOf(
87 "ILIAS\\UI\\Component\\Button\\Bulky",
90 $this->assertTrue($b->isEngaged());
91 $this->assertTrue($b->isEngageable());
◆ testGlyphOrIconForGlyph()
BulkyButtonTest::testGlyphOrIconForGlyph |
( |
| ) |
|
◆ testGlyphOrIconForIcon()
BulkyButtonTest::testGlyphOrIconForIcon |
( |
| ) |
|
◆ testImplementsFactoryInterface()
BulkyButtonTest::testImplementsFactoryInterface |
( |
| ) |
|
◆ testRenderButtonWithAriaRoleMenuitemIsEngageable()
BulkyButtonTest::testRenderButtonWithAriaRoleMenuitemIsEngageable |
( |
| ) |
|
Definition at line 222 of file BulkyButtonTest.php.
References Vendor\Package\$b, and $r.
224 $r = $this->getDefaultRenderer();
225 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de")
226 ->withEngagedState(
false)
230 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" role="menuitem" aria-haspopup="true">' 231 .
' <img class="icon someExample small" src="./assets/images/standard/icon_default.svg" alt=""/>' 232 .
' <span class="bulky-label">label</span>' 235 $this->assertHTMLEquals(
◆ testRenderButtonWithAriaRoleMenuitemNotEngageable()
BulkyButtonTest::testRenderButtonWithAriaRoleMenuitemNotEngageable |
( |
| ) |
|
Definition at line 204 of file BulkyButtonTest.php.
References Vendor\Package\$b, and $r.
206 $r = $this->getDefaultRenderer();
207 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de")
211 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" role="menuitem">' 212 .
' <img class="icon someExample small" src="./assets/images/standard/icon_default.svg" alt=""/>' 213 .
' <span class="bulky-label">label</span>' 216 $this->assertHTMLEquals(
◆ testRenderWithGlyphInContext()
BulkyButtonTest::testRenderWithGlyphInContext |
( |
| ) |
|
◆ testRenderWithGlyphInContextAndDisengaged()
BulkyButtonTest::testRenderWithGlyphInContextAndDisengaged |
( |
| ) |
|
◆ testRenderWithGlyphInContextAndEngaged()
BulkyButtonTest::testRenderWithGlyphInContextAndEngaged |
( |
| ) |
|
◆ testRenderWithHelpTopics()
BulkyButtonTest::testRenderWithHelpTopics |
( |
| ) |
|
Definition at line 259 of file BulkyButtonTest.php.
References Vendor\Package\$b, $r, and ILIAS\Repository\button().
261 $r = $this->getDefaultRenderer();
262 $b = $this->button_factory->bulky($this->icon,
"Example",
"http://www.ilias.de")
264 ->withHelpTopics(
new \
ILIAS\
UI\Help\Topic(
"a"));
268 <div
class=
"c-tooltip__container">
269 <
button class=
"btn btn-bulky" data-action=
"http://www.ilias.de" id=
"id_1" role=
"menuitem" aria-describedby=
"id_2">
270 <img
class=
"icon someExample small" src=
"./assets/images/standard/icon_default.svg" alt=
"" /><span
class=
"bulky-label">Example</span>
272 <div
id=
"id_2" role=
"tooltip" class=
"c-tooltip c-tooltip--hidden"><p>tooltip: a</p></div>
276 $this->assertHTMLEquals(
button(string $caption, string $cmd)
Interface Observer Contains several chained tasks and infos about them.
◆ testRenderWithIcon()
BulkyButtonTest::testRenderWithIcon |
( |
| ) |
|
Definition at line 187 of file BulkyButtonTest.php.
References Vendor\Package\$b, and $r.
189 $r = $this->getDefaultRenderer();
190 $b = $this->button_factory->bulky($this->icon,
"label",
"http://www.ilias.de");
193 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1">' 194 .
' <img class="icon someExample small" src="./assets/images/standard/icon_default.svg" alt=""/>' 195 .
' <span class="bulky-label">label</span>' 198 $this->assertHTMLEquals(
◆ testRenderWithLabelAndAltImageSame()
BulkyButtonTest::testRenderWithLabelAndAltImageSame |
( |
| ) |
|
Definition at line 241 of file BulkyButtonTest.php.
References Vendor\Package\$b, and $r.
243 $r = $this->getDefaultRenderer();
244 $b = $this->button_factory->bulky($this->icon,
"Example",
"http://www.ilias.de")
245 ->withEngagedState(
false)
249 .
'<button class="btn btn-bulky" data-action="http://www.ilias.de" id="id_1" role="menuitem" aria-haspopup="true">' 250 .
' <img class="icon someExample small" src="./assets/images/standard/icon_default.svg" alt=""/>' 251 .
' <span class="bulky-label">Example</span>' 254 $this->assertHTMLEquals(
◆ testWithAriaRole()
BulkyButtonTest::testWithAriaRole |
( |
| ) |
|
◆ testWithAriaRoleIncorrect()
BulkyButtonTest::testWithAriaRoleIncorrect |
( |
| ) |
|
Definition at line 120 of file BulkyButtonTest.php.
References Vendor\Package\$e.
123 $this->button_factory->bulky($this->glyph,
"label",
"http://www.ilias.de")
124 ->withAriaRole(
"loremipsum");
125 $this->assertFalse(
"This should not happen");
127 $this->assertTrue(
true);
◆ $button_factory
I Component Button Factory BulkyButtonTest::$button_factory |
|
private |
◆ $glyph
I Component Symbol Glyph Glyph BulkyButtonTest::$glyph |
|
private |
◆ $icon
I Component Symbol Icon Standard BulkyButtonTest::$icon |
|
private |
The documentation for this class was generated from the following file: