3 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../../libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../../Base.php");
41 $this->data_factory =
new Data\Factory();
47 $this->
lng = $this->createMock(ilLanguage::class);
48 $this->
lng->method(
"txt")
49 ->will($this->returnArgument(0));
61 return new I\Input\Field\Factory(
73 public function symbol(): C\Symbol\Factory
86 $format = $this->data_factory->dateFormat()->germanShort();
87 $duration = $this->factory->duration(
'label',
'byline')
92 $duration->getFormat()
99 $duration = $this->factory->duration(
'label',
'byline')
100 ->withMinValue($dat);
104 $duration->getMinValue()
111 $duration = $this->factory->duration(
'label',
'byline')
112 ->withMaxValue($dat);
116 $duration->getMaxValue()
122 $datetime = $this->factory->duration(
'label',
'byline');
123 $this->assertFalse($datetime->getUseTime());
124 $this->assertTrue($datetime->withUseTime(
true)->getUseTime());
129 $datetime = $this->factory->duration(
'label',
'byline');
130 $this->assertFalse($datetime->getTimeOnly());
131 $this->assertTrue($datetime->withTimeOnly(
true)->getTimeOnly());
136 $datetime = $this->factory->duration(
'label',
'byline');
137 $this->assertNull($datetime->getTimeZone());
138 $tz =
'Europe/Moscow';
141 $datetime->withTimeZone($tz)->getTimeZone()
147 $this->expectException(InvalidArgumentException::class);
148 $datetime = $this->factory->duration(
'label',
'byline');
149 $tz =
'NOT/aValidTZ';
150 $datetime->withTimeZone($tz);
155 $datetime = $this->factory->duration(
'label');
156 $this->assertInstanceOf(
C\
Input\Field\Duration::class, $datetime);
161 $datetime = $this->factory->duration(
'label',
'byline');
164 $label_start =
'duration_default_label_start';
165 $label_end =
'duration_default_label_end';
169 <div class="form-group row"> 170 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">label</label> 171 <div class="col-sm-8 col-md-9 col-lg-10"> 172 <div class="il-input-duration" id="id_1"> 173 <div class="form-group row"> 174 <label for="id_2" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label_start .
'</label> 175 <div class="col-sm-8 col-md-9 col-lg-10"> 176 <div class="input-group date il-input-datetime" id="id_2"><input type="text" name="" placeholder="YYYY-MM-DD" class="form-control form-control-sm" /><span class="input-group-addon"><a tabindex="0" class="glyph" href="#" aria-label="calendar"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></a></span></div> 179 <div class="form-group row"> 180 <label for="id_3" class="control-label col-sm-4 col-md-3 col-lg-2">' . $label_end .
'</label> 181 <div class="col-sm-8 col-md-9 col-lg-10"> 182 <div class="input-group date il-input-datetime" id="id_3"><input type="text" name="" placeholder="YYYY-MM-DD" class="form-control form-control-sm" /><span class="input-group-addon"><a tabindex="0" class="glyph" href="#" aria-label="calendar"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></a></span></div> 186 <div class="help-block">byline</div> 190 $this->assertEquals($expected, $html);
200 $other_start_label =
'other startlabel';
201 $other_end_label =
'other endlabel';
202 $datetime = $datetime->withLabels($other_start_label, $other_end_label);
208 <div class="form-group row"> 209 <label for="id_1" class="control-label col-sm-4 col-md-3 col-lg-2">label</label> 210 <div class="col-sm-8 col-md-9 col-lg-10"> 211 <div class="il-input-duration" id="id_1"> 212 <div class="form-group row"> 213 <label for="id_2" class="control-label col-sm-4 col-md-3 col-lg-2">' . $other_start_label .
'</label> 214 <div class="col-sm-8 col-md-9 col-lg-10"> 215 <div class="input-group date il-input-datetime" id="id_2"><input type="text" name="" placeholder="YYYY-MM-DD" class="form-control form-control-sm" /><span class="input-group-addon"><a tabindex="0" class="glyph" href="#" aria-label="calendar"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></a></span></div> 218 <div class="form-group row"> 219 <label for="id_3" class="control-label col-sm-4 col-md-3 col-lg-2">' . $other_end_label .
'</label> 220 <div class="col-sm-8 col-md-9 col-lg-10"> 221 <div class="input-group date il-input-datetime" id="id_3"><input type="text" name="" placeholder="YYYY-MM-DD" class="form-control form-control-sm" /><span class="input-group-addon"><a tabindex="0" class="glyph" href="#" aria-label="calendar"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span></a></span></div> 225 <div class="help-block">byline</div> 229 $this->assertEquals($expected, $html);
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
Provides common functionality for UI tests.