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);
61 $lng_consecutive_calls = [];
62 $lng->expects($this->atLeastOnce())
65 function (
$txt) use (&$lng_consecutive_calls) {
66 $lng_consecutive_calls[] =
$txt;
71 $expected_consecutive_calls = [
77 $field = $obj->toFormInput(
82 self::VALID_TYPE_1 =>
'first',
83 self::VALID_TYPE_2 =>
'second' 87 $this->assertEquals($expected_consecutive_calls, $lng_consecutive_calls);
90 $select = $field->getInputs()[
'type'];
92 $this->assertInstanceOf(
96 $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...