Definition at line 21 of file ilComponentInfoTest.php.
◆ setUp()
ilComponentInfoTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 27 of file ilComponentInfoTest.php.
27 : void
28 {
29 $slots = [];
30
32 "mod1",
33 "components/ILIAS",
34 "Module1",
35 $slots
36 );
37
38 $plugins = [];
40 $this->component,
41 "slt1",
42 "Slot1",
43 $plugins
44 );
45
47 $this->component,
48 "slt2",
49 "Slot2",
50 $plugins
51 );
52
55 }
ilPluginSlotInfo $pluginslot2
ilPluginSlotInfo $pluginslot1
Simple value class for basic information about a component.
Simple value class for basic information about a pluginslot.
References $pluginslot1, and $pluginslot2.
◆ testGetPluginSlotById()
ilComponentInfoTest::testGetPluginSlotById |
( |
| ) |
|
Definition at line 93 of file ilComponentInfoTest.php.
93 : void
94 {
95 $plugins = [];
96 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $this->component->getPluginSlotById(
"slt1"));
97 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $this->component->getPluginSlotById(
"slt2"));
98 }
◆ testGetPluginSlotByName()
ilComponentInfoTest::testGetPluginSlotByName |
( |
| ) |
|
Definition at line 119 of file ilComponentInfoTest.php.
119 : void
120 {
121 $plugins = [];
122 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $this->component->getPluginSlotByName(
"Slot1"));
123 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $this->component->getPluginSlotByName(
"Slot2"));
124 }
◆ testGetPluginsSlots()
ilComponentInfoTest::testGetPluginsSlots |
( |
| ) |
|
Definition at line 77 of file ilComponentInfoTest.php.
77 : void
78 {
79 $pluginslots = iterator_to_array($this->component->getPluginSlots());
80 $plugins = [];
81 $this->assertCount(2, $pluginslots);
82 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt1",
"Slot1", $plugins), $pluginslots[
"slt1"]);
83 $this->assertEquals(
new ilPluginSlotInfo($this->component,
"slt2",
"Slot2", $plugins), $pluginslots[
"slt2"]);
84 }
◆ testGetter()
ilComponentInfoTest::testGetter |
( |
| ) |
|
Definition at line 57 of file ilComponentInfoTest.php.
57 : void
58 {
59 $this->assertEquals("mod1", $this->component->getId());
60 $this->assertEquals("components/ILIAS", $this->component->getType());
61 $this->assertEquals("Module1", $this->component->getName());
62 $this->assertEquals("components/ILIAS/Module1", $this->component->getQualifiedName());
63 }
◆ testGetUnknownPluginSlot()
ilComponentInfoTest::testGetUnknownPluginSlot |
( |
| ) |
|
Definition at line 106 of file ilComponentInfoTest.php.
106 : void
107 {
108 $this->expectException(\InvalidArgumentException::class);
109 $this->component->getPluginSlotById("slt3");
110 }
◆ testGetUnknownPluginSlotById()
ilComponentInfoTest::testGetUnknownPluginSlotById |
( |
| ) |
|
Definition at line 100 of file ilComponentInfoTest.php.
100 : void
101 {
102 $this->expectException(\InvalidArgumentException::class);
103 $this->component->getPluginSlotById("slt3");
104 }
◆ testGetUnknownPluginSlotByName()
ilComponentInfoTest::testGetUnknownPluginSlotByName |
( |
| ) |
|
Definition at line 126 of file ilComponentInfoTest.php.
126 : void
127 {
128 $this->expectException(\InvalidArgumentException::class);
129 $this->component->getPluginSlotById("Slot3");
130 }
◆ testHasPluginSlotId()
ilComponentInfoTest::testHasPluginSlotId |
( |
| ) |
|
Definition at line 86 of file ilComponentInfoTest.php.
86 : void
87 {
88 $this->assertTrue($this->component->hasPluginSlotId("slt1"));
89 $this->assertTrue($this->component->hasPluginSlotId("slt2"));
90 $this->assertFalse($this->component->hasPluginSlotId("slt3"));
91 }
◆ testHasPluginSlotName()
ilComponentInfoTest::testHasPluginSlotName |
( |
| ) |
|
Definition at line 112 of file ilComponentInfoTest.php.
112 : void
113 {
114 $this->assertTrue($this->component->hasPluginSlotName("Slot1"));
115 $this->assertTrue($this->component->hasPluginSlotName("Slot2"));
116 $this->assertFalse($this->component->hasPluginSlotName("Slot3"));
117 }
◆ testInvalidTypeThrowsException()
ilComponentInfoTest::testInvalidTypeThrowsException |
( |
| ) |
|
Definition at line 65 of file ilComponentInfoTest.php.
65 : void
66 {
67 $this->expectException(\InvalidArgumentException::class);
68 $slots = [];
70 "id",
71 "SomeOtherType",
72 "name",
73 $slots
74 );
75 }
◆ $component
◆ $pluginslot1
◆ $pluginslot2
The documentation for this class was generated from the following file: