19 declare(strict_types=1);
32 $this->assertEquals(self::VALID_TYPE_1, $obj->getTypeId());
39 $new = $obj->withTypeId(self::VALID_TYPE_2);
41 $this->assertEquals(self::VALID_TYPE_1, $obj->getTypeId());
42 $this->assertEquals(self::VALID_TYPE_2, $new->getTypeId());
45 public function testToFormInput():
void 47 $lng = $this->createMock(ilLanguage::class);
62 $lng_consecutive_calls = [];
63 $lng->expects($this->atLeastOnce())
66 function (
$txt) use (&$lng_consecutive_calls) {
67 $lng_consecutive_calls[] =
$txt;
72 $expected_consecutive_calls = [
78 $field = $obj->toFormInput(
83 self::VALID_TYPE_1 =>
'first',
84 self::VALID_TYPE_2 =>
'second' 88 $this->assertEquals($expected_consecutive_calls, $lng_consecutive_calls);
91 $select = $field->getInputs()[
'type'];
93 $this->assertInstanceOf(
97 $this->assertEquals(self::VALID_TYPE_1, $select->getValue());
testSuccessfulWithTypeId()
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...