ILIAS  release_8 Revision v8.24
DynamicInputsNameSourceTest.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24use PHPUnit\Framework\TestCase;
25
29class 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}
Other than the FormInputNameSource this name source is for inputs that can be dynamically added multi...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...