Definition at line 31 of file DateTimeInputTest.php.
◆ buildFactory()
DateTimeInputTest::buildFactory |
( |
| ) |
|
|
protected |
Definition at line 68 of file DateTimeInputTest.php.
Referenced by setUp().
68 : I\Input\Field\Factory
70 $df =
new Data\Factory();
71 $language = $this->createMock(ilLanguage::class);
73 return new I\Input\Field\Factory(
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ getLanguage()
DateTimeInputTest::getLanguage |
( |
| ) |
|
◆ getUIFactory()
DateTimeInputTest::getUIFactory |
( |
| ) |
|
Definition at line 44 of file DateTimeInputTest.php.
47 public function symbol():
C\Symbol\
Factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ setUp()
DateTimeInputTest::setUp |
( |
| ) |
|
◆ test_jsConfigRendering()
DateTimeInputTest::test_jsConfigRendering |
( |
| ) |
|
Definition at line 151 of file DateTimeInputTest.php.
References ILIAS_UI_TestBase\getDefaultRenderer(), and ILIAS_UI_TestBase\getJavaScriptBinding().
153 $datetime = $this->factory->datetime(
'label',
'byline');
157 $expected =
'$("#id_1").datetimepicker({' 158 .
'"showClear":true,' 159 .
'"sideBySide":true,' 160 .
'"format":"YYYY-MM-DD",' 164 $onload_js = array_shift($js_binding->on_load_code);
165 $this->assertEquals($expected, $onload_js);
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
◆ test_withFormat()
DateTimeInputTest::test_withFormat |
( |
| ) |
|
Definition at line 82 of file DateTimeInputTest.php.
References $format.
84 $format = $this->data_factory->dateFormat()->germanShort();
85 $datetime = $this->factory->datetime(
'label',
'byline')
90 $datetime->getFormat()
◆ test_withInvalidTimeZone()
DateTimeInputTest::test_withInvalidTimeZone |
( |
| ) |
|
Definition at line 143 of file DateTimeInputTest.php.
145 $this->expectException(InvalidArgumentException::class);
146 $datetime = $this->factory->datetime(
'label',
'byline');
147 $tz =
'NOT/aValidTZ';
148 $datetime->withTimeZone($tz);
◆ test_withMaxValue()
DateTimeInputTest::test_withMaxValue |
( |
| ) |
|
Definition at line 106 of file DateTimeInputTest.php.
109 $datetime = $this->factory->datetime(
'label',
'byline')
110 ->withMaxValue($dat);
114 $datetime->getMaxValue()
◆ test_withMinValue()
DateTimeInputTest::test_withMinValue |
( |
| ) |
|
Definition at line 94 of file DateTimeInputTest.php.
97 $datetime = $this->factory->datetime(
'label',
'byline')
102 $datetime->getMinValue()
◆ test_withTimeOnly()
DateTimeInputTest::test_withTimeOnly |
( |
| ) |
|
Definition at line 125 of file DateTimeInputTest.php.
127 $datetime = $this->factory->datetime(
'label',
'byline');
128 $this->assertFalse($datetime->getTimeOnly());
129 $this->assertTrue($datetime->withTimeOnly(
true)->getTimeOnly());
◆ test_withTimeZone()
DateTimeInputTest::test_withTimeZone |
( |
| ) |
|
Definition at line 132 of file DateTimeInputTest.php.
134 $datetime = $this->factory->datetime(
'label',
'byline');
135 $this->assertNull($datetime->getTimeZone());
136 $tz =
'Europe/Moscow';
139 $datetime->withTimeZone($tz)->getTimeZone()
◆ test_withUseTime()
DateTimeInputTest::test_withUseTime |
( |
| ) |
|
Definition at line 118 of file DateTimeInputTest.php.
120 $datetime = $this->factory->datetime(
'label',
'byline');
121 $this->assertFalse($datetime->getUseTime());
122 $this->assertTrue($datetime->withUseTime(
true)->getUseTime());
◆ test_withValueThatIsDateTimeImmutable()
DateTimeInputTest::test_withValueThatIsDateTimeImmutable |
( |
| ) |
|
Definition at line 168 of file DateTimeInputTest.php.
170 $string_value =
"1985-05-04";
171 $value = new \DateTimeImmutable($string_value);
172 $datetime = $this->factory->datetime(
'label',
'byline')
176 $datetime->getValue()
◆ $data_factory
Data Factory DateTimeInputTest::$data_factory |
|
protected |
◆ $factory
I Input Field Factory DateTimeInputTest::$factory |
|
protected |
◆ $name_source
The documentation for this class was generated from the following file: