28 protected function setUp(): void
60 $this->assertEquals(
"mod1", $this->component->getId());
61 $this->assertEquals(
"components/ILIAS", $this->component->getType());
62 $this->assertEquals(
"Module1", $this->component->getName());
63 $this->assertEquals(
"components/ILIAS/Module1", $this->component->getQualifiedName());
68 $this->expectException(\InvalidArgumentException::class);
80 $pluginslots = iterator_to_array($this->component->getPluginSlots());
82 $this->assertCount(2, $pluginslots);
83 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $pluginslots[
"slt1"]);
84 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $pluginslots[
"slt2"]);
89 $this->assertTrue($this->component->hasPluginSlotId(
"slt1"));
90 $this->assertTrue($this->component->hasPluginSlotId(
"slt2"));
91 $this->assertFalse($this->component->hasPluginSlotId(
"slt3"));
97 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $this->component->getPluginSlotById(
"slt1"));
98 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $this->component->getPluginSlotById(
"slt2"));
103 $this->expectException(\InvalidArgumentException::class);
104 $this->component->getPluginSlotById(
"slt3");
109 $this->expectException(\InvalidArgumentException::class);
110 $this->component->getPluginSlotById(
"slt3");
115 $this->assertTrue($this->component->hasPluginSlotName(
"Slot1"));
116 $this->assertTrue($this->component->hasPluginSlotName(
"Slot2"));
117 $this->assertFalse($this->component->hasPluginSlotName(
"Slot3"));
123 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $this->component->getPluginSlotByName(
"Slot1"));
124 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $this->component->getPluginSlotByName(
"Slot2"));
129 $this->expectException(\InvalidArgumentException::class);
130 $this->component->getPluginSlotById(
"Slot3");
testGetUnknownPluginSlotById()
Simple value class for basic information about a pluginslot.
testGetPluginSlotByName()
ilPluginSlotInfo $pluginslot1
ilPluginSlotInfo $pluginslot2
testGetUnknownPluginSlot()
testInvalidTypeThrowsException()
ilComponentInfo $component
testGetUnknownPluginSlotByName()
Simple value class for basic information about a component.