3 declare(strict_types=1);
44 $this->data_factory = $this->createMock(DataFactory::class);
45 $this->
language = $this->createMock(ilLanguage::class);
46 $this->
refinery = $this->createMock(Refinery::class);
48 public function getUpdateOnLoadCode():
Closure 50 return static function () {
54 protected function getConstraintForRequirement(): ?
Constraint 68 $dynamic_input = $this->input->withValue([
75 $dynamic_input->getDynamicInputs()
81 $input_value_1 =
'val1';
82 $input_value_2 =
'val2';
83 $dynamic_input = $this->input->withValue([
88 $generated_inputs = $dynamic_input->getDynamicInputs();
89 $this->assertEquals($input_value_1, $generated_inputs[0]->
getValue());
90 $this->assertEquals($input_value_2, $generated_inputs[1]->
getValue());
96 $this->assertFalse($dynamic_input->getTemplateForDynamicInputs()->isDisabled());
97 $this->assertFalse($dynamic_input->isDisabled());
101 $this->assertTrue($dynamic_input->getTemplateForDynamicInputs()->isDisabled());
102 $this->assertTrue($dynamic_input->isDisabled());
107 $dynamic_input = $this->input->withValue([
'',
'']);
108 $generated_inputs = $dynamic_input->getDynamicInputs();
110 $this->assertFalse($generated_inputs[0]->isDisabled());
111 $this->assertFalse($generated_inputs[1]->isDisabled());
112 $this->assertFalse($dynamic_input->getTemplateForDynamicInputs()->isDisabled());
113 $this->assertFalse($dynamic_input->isDisabled());
115 $dynamic_input = $dynamic_input->withDisabled(
true);
116 $generated_inputs = $dynamic_input->getDynamicInputs();
118 $this->assertTrue($generated_inputs[0]->isDisabled());
119 $this->assertTrue($generated_inputs[1]->isDisabled());
120 $this->assertTrue($dynamic_input->getTemplateForDynamicInputs()->isDisabled());
121 $this->assertTrue($dynamic_input->isDisabled());
130 $input_name =
'test_name[input_0][]';
131 $dynamic_input = $this->input->withValue([
'',
'']);
132 $dynamic_input = $dynamic_input->withNameFrom(
138 $dynamic_input->getTemplateForDynamicInputs()->getName()
141 $generated_inputs = $dynamic_input->getDynamicInputs();
144 $generated_inputs[0]->getName()
149 $generated_inputs[1]->getName()
156 public function getNewName():
string 166 public function getUpdateOnLoadCode():
Closure 168 return static function () {
172 protected function getConstraintForRequirement(): ?
Constraint
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
A constraint encodes some resrtictions on values.