19 declare(strict_types=1);
38 return $this->
getAmdForm(
'#', $available_records, $type);
47 $language = $this->createMock(ilLanguage::class);
55 $language = $this->createMock(ilLanguage::class);
56 $filter_factory = $this->createMock(
Component\Input\Container\
Filter\Factory::class);
59 $upload_limit_resolver = $this->createMock(
Component\Input\UploadLimitResolver::class);
62 $factory =
new class (
66 $view_control_factory,
68 $upload_limit_resolver,
72 protected $node_factory,
74 protected $filter_factory,
75 protected $view_control_factory,
76 protected $control_factory,
77 protected $upload_limit_resolver,
82 public function input(): Component\Input\Factory
84 $signal_generator =
new Component\SignalGenerator();
87 $field_factory =
new Component\Input\Field\Factory(
89 $this->upload_limit_resolver,
96 $form_factory =
new Component\Input\Container\Form\Factory(
100 $container_factory =
new Component\Input\Container\Factory(
102 $this->filter_factory,
103 $this->view_control_factory
106 return new Component\Input\Factory(
110 $this->control_factory,
119 $amdr1 = $this->createMock(ilAdvancedMDRecord::class);
121 ->method(
'getRecordId')
125 ->willReturn(
'title 1');
127 $amdr2 = $this->createMock(ilAdvancedMDRecord::class);
129 ->method(
'getRecordId')
133 ->willReturn(
'title 2');
135 $type = $this->createMock(ilOrgUnitType::class);
137 ->method(
'getAssignedAdvancedMDRecordIds')
141 $this->getRefinery(),
142 $this->getUIFactory(),
143 $this->createMock(ilLanguage::class)
146 $form = $gui->mockGetAmdForm([$amdr1, $amdr2], $type);
147 $this->assertInstanceOf(StandardForm::class, $form);
149 $section = current($form->getInputs());
150 $this->assertInstanceOf(Section::class, $section);
152 $inputs = $section->getInputs();
153 $this->assertEquals(1, count(
$inputs));
__construct(protected ILIAS\Refinery\Factory $refinery, protected ILIAS\UI\Factory $ui_factory, protected ilLanguage $lng,)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer Contains several chained tasks and infos about them.
mockGetAmdForm(array $available_records, ilOrgUnitType $type)
getAmdForm(string $action, array $available_records, ilOrgUnitType $type)
DataFactory $data_factory
testOrgUnitTypeGuiAMDForm()
language()
description: > Example for rendring a language glyph.