23 protected function setUp(): void
49 $slots[] = $this->pluginslot1;
50 $slots[] = $this->pluginslot2;
55 $this->assertEquals(
"mod1", $this->component->getId());
56 $this->assertEquals(
"Modules", $this->component->getType());
57 $this->assertEquals(
"Module1", $this->component->getName());
58 $this->assertEquals(
"Modules/Module1", $this->component->getQualifiedName());
63 $this->expectException(\InvalidArgumentException::class);
75 $pluginslots = iterator_to_array($this->component->getPluginSlots());
77 $this->assertCount(2, $pluginslots);
78 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $pluginslots[
"slt1"]);
79 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $pluginslots[
"slt2"]);
84 $this->assertTrue($this->component->hasPluginSlotId(
"slt1"));
85 $this->assertTrue($this->component->hasPluginSlotId(
"slt2"));
86 $this->assertFalse($this->component->hasPluginSlotId(
"slt3"));
92 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $this->component->getPluginSlotById(
"slt1"));
93 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $this->component->getPluginSlotById(
"slt2"));
98 $this->expectException(\InvalidArgumentException::class);
99 $this->component->getPluginSlotById(
"slt3");
104 $this->expectException(\InvalidArgumentException::class);
105 $this->component->getPluginSlotById(
"slt3");
110 $this->assertTrue($this->component->hasPluginSlotName(
"Slot1"));
111 $this->assertTrue($this->component->hasPluginSlotName(
"Slot2"));
112 $this->assertFalse($this->component->hasPluginSlotName(
"Slot3"));
118 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $this->component->getPluginSlotByName(
"Slot1"));
119 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $this->component->getPluginSlotByName(
"Slot2"));
124 $this->expectException(\InvalidArgumentException::class);
125 $this->component->getPluginSlotById(
"Slot3");
testGetUnknownPluginSlotById()
Simple value class for basic information about a pluginslot.
testGetPluginSlotByName()
testGetUnknownPluginSlot()
testInvalidTypeThrowsException()
testGetUnknownPluginSlotByName()
Simple value class for basic information about a component.