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

Test month button. More...

+ Inheritance diagram for ButtonMonthTest:
+ Collaboration diagram for ButtonMonthTest:

Public Member Functions

 getFactory ()
 
 testImplementsFactoryInterface ()
 
 testGetDefault ()
 
 testRender ()
 

Detailed Description

Test month button.

Definition at line 29 of file ButtonMonthTest.php.

Member Function Documentation

◆ getFactory()

ButtonMonthTest::getFactory ( )

Definition at line 31 of file ButtonMonthTest.php.

31 : I\Component\Button\Factory
32 {
33 return new I\Component\Button\Factory();
34 }

Referenced by testGetDefault(), testImplementsFactoryInterface(), and testRender().

+ Here is the caller graph for this function:

◆ testGetDefault()

ButtonMonthTest::testGetDefault ( )

Definition at line 43 of file ButtonMonthTest.php.

43 : void
44 {
45 $f = $this->getFactory();
46 $c = $f->month("02-2017");
47
48 $this->assertEquals("02-2017", $c->getDefault());
49 }
$c
Definition: deliver.php:25

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

+ Here is the call graph for this function:

◆ testImplementsFactoryInterface()

ButtonMonthTest::testImplementsFactoryInterface ( )

Definition at line 36 of file ButtonMonthTest.php.

36 : void
37 {
38 $f = $this->getFactory();
39
40 $this->assertInstanceOf("ILIAS\\UI\\Component\\Button\\Month", $f->month("02-2017"));
41 }

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

+ Here is the call graph for this function:

◆ testRender()

ButtonMonthTest::testRender ( )

Definition at line 51 of file ButtonMonthTest.php.

51 : 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>
64EOT;
65 $this->assertEquals(
66 $this->brutallyTrimHTML($expected_html),
67 $this->brutallyTrimHTML($html)
68 );
69 }

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: