ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
DynamicInputsNameSourceTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
25 
29 class DynamicInputsNameSourceTest extends TestCase
30 {
31  public function testNewNameGeneration(): void
32  {
33  $expected_parent_name = 'parent_input_name_xyz';
34 
35  $name_source = new DynamicInputsNameSource($expected_parent_name);
36 
37  $this->assertEquals(
38  $expected_parent_name . "[input_0][]",
39  $name_source->getNewName()
40  );
41 
42  $this->assertEquals(
43  $expected_parent_name . "[input_1][]",
44  $name_source->getNewName()
45  );
46  }
47 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Other than the FormInputNameSource this name source is for inputs that can be dynamically added multi...