19declare(strict_types=1);
21use PHPUnit\Framework\TestCase;
38 return $this->
getAmdForm(
'#', $available_records, $type);
46 $data_factory = new \ILIAS\Data\Factory();
47 $language = $this->createMock(ilLanguage::class);
48 $refinery = new \ILIAS\Refinery\Factory($data_factory, $language);
55 $language = $this->createMock(ilLanguage::class);
57 $view_control_factory = $this->createMock(
Component\Input\
Container\ViewControl\Factory::class);
58 $control_factory = $this->createMock(
Component\Input\ViewControl\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,
84 $signal_generator =
new Component\SignalGenerator();
85 $data_factory = new \ILIAS\Data\Factory();
89 $this->upload_limit_resolver,
102 $this->filter_factory,
103 $this->view_control_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')
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));
Builds a Color from either hex- or rgb values.
testOrgUnitTypeGuiAMDForm()
getAmdForm(string $action, array $available_records, ilOrgUnitType $type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(protected ILIAS\Refinery\Factory $refinery, protected ILIAS\UI\Factory $ui_factory, protected ilLanguage $lng,)
mockGetAmdForm(array $available_records, ilOrgUnitType $type)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.