ILIAS
trunk Revision v11.0_alpha-2662-g519ff7d528f
◀ ilDoc Overview
ButtonMonthTest.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
require_once(__DIR__ .
"/../../../../../../vendor/composer/vendor/autoload.php"
);
22
require_once(__DIR__ .
"/../../Base.php"
);
23
24
use
ILIAS\UI\Implementation
as
I
;
25
29
class
ButtonMonthTest
extends
ILIAS_UI_TestBase
30
{
31
public
function
getFactory
():
I
\
Component
\
Button
\Factory
32
{
33
return
new
I\Component\Button\Factory();
34
}
35
36
public
function
testImplementsFactoryInterface
(): void
37
{
38
$f
= $this->
getFactory
();
39
40
$this->assertInstanceOf(
"ILIAS\\UI\\Component\\Button\\Month"
,
$f
->month(
"02-2017"
));
41
}
42
43
public
function
testGetDefault
(): void
44
{
45
$f
= $this->
getFactory
();
46
$c
=
$f
->month(
"02-2017"
);
47
48
$this->assertEquals(
"02-2017"
,
$c
->getDefault());
49
}
50
51
public
function
testRender
(): void
52
{
53
$f
= $this->
getFactory
();
54
$r
= $this->getDefaultRenderer();
55
56
$c
=
$f
->month(
"02-2017"
);
57
58
$html =
$r
->render(
$c
);
59
60
$expected_html = <<<EOT
61
<div
id
=
"id_1"
class
=
"btn-group il-btn-month"
>
62
<input type=
"month"
class
=
"btn btn-default"
value=
"2017-02"
/>
63
</div>
64
EOT;
65
$this->assertEquals(
66
$this->brutallyTrimHTML($expected_html),
67
$this->brutallyTrimHTML($html)
68
);
69
}
70
}
ButtonMonthTest\testImplementsFactoryInterface
testImplementsFactoryInterface()
Definition:
ButtonMonthTest.php:36
Standard
ILIAS\UI\Implementation
ILIAS\UI\Component
ButtonMonthTest\testGetDefault
testGetDefault()
Definition:
ButtonMonthTest.php:43
$c
$c
Definition:
deliver.php:25
ButtonMonthTest
Test month button.
Definition:
ButtonMonthTest.php:29
Vendor\Package\$f
$f
Definition:
example_cleaned.php:49
ButtonMonthTest\testRender
testRender()
Definition:
ButtonMonthTest.php:51
ILIAS_UI_TestBase
ButtonMonthTest\getFactory
getFactory()
Definition:
ButtonMonthTest.php:31
$r
$r
Definition:
shib_logout.php:142
components
ILIAS
UI
tests
Component
Button
ButtonMonthTest.php
Generated on Wed Sep 3 2025 23:04:18 for ILIAS by
1.8.13 (using
Doxyfile
)