Definition at line 21 of file ilComponentInfoTest.php.
◆ setUp()
| ilComponentInfoTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 23 of file ilComponentInfoTest.php.
23 : void
24 {
25 $slots = [];
26
28 "mod1",
29 "Modules",
30 "Module1",
31 $slots
32 );
33
34 $plugins = [];
36 $this->component,
37 "slt1",
38 "Slot1",
39 $plugins
40 );
41
43 $this->component,
44 "slt2",
45 "Slot2",
46 $plugins
47 );
48
49 $slots[] = $this->pluginslot1;
50 $slots[] = $this->pluginslot2;
51 }
Simple value class for basic information about a component.
Simple value class for basic information about a pluginslot.
◆ testGetPluginSlotById()
| ilComponentInfoTest::testGetPluginSlotById |
( |
| ) |
|
Definition at line 89 of file ilComponentInfoTest.php.
89 : void
90 {
91 $plugins = [];
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"));
94 }
◆ testGetPluginSlotByName()
| ilComponentInfoTest::testGetPluginSlotByName |
( |
| ) |
|
Definition at line 115 of file ilComponentInfoTest.php.
115 : void
116 {
117 $plugins = [];
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"));
120 }
◆ testGetPluginsSlots()
| ilComponentInfoTest::testGetPluginsSlots |
( |
| ) |
|
Definition at line 73 of file ilComponentInfoTest.php.
73 : void
74 {
75 $pluginslots = iterator_to_array($this->component->getPluginSlots());
76 $plugins = [];
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"]);
80 }
◆ testGetter()
| ilComponentInfoTest::testGetter |
( |
| ) |
|
Definition at line 53 of file ilComponentInfoTest.php.
53 : void
54 {
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());
59 }
◆ testGetUnknownPluginSlot()
| ilComponentInfoTest::testGetUnknownPluginSlot |
( |
| ) |
|
Definition at line 102 of file ilComponentInfoTest.php.
102 : void
103 {
104 $this->expectException(\InvalidArgumentException::class);
105 $this->component->getPluginSlotById("slt3");
106 }
◆ testGetUnknownPluginSlotById()
| ilComponentInfoTest::testGetUnknownPluginSlotById |
( |
| ) |
|
Definition at line 96 of file ilComponentInfoTest.php.
96 : void
97 {
98 $this->expectException(\InvalidArgumentException::class);
99 $this->component->getPluginSlotById("slt3");
100 }
◆ testGetUnknownPluginSlotByName()
| ilComponentInfoTest::testGetUnknownPluginSlotByName |
( |
| ) |
|
Definition at line 122 of file ilComponentInfoTest.php.
122 : void
123 {
124 $this->expectException(\InvalidArgumentException::class);
125 $this->component->getPluginSlotById("Slot3");
126 }
◆ testHasPluginSlotId()
| ilComponentInfoTest::testHasPluginSlotId |
( |
| ) |
|
Definition at line 82 of file ilComponentInfoTest.php.
82 : void
83 {
84 $this->assertTrue($this->component->hasPluginSlotId("slt1"));
85 $this->assertTrue($this->component->hasPluginSlotId("slt2"));
86 $this->assertFalse($this->component->hasPluginSlotId("slt3"));
87 }
◆ testHasPluginSlotName()
| ilComponentInfoTest::testHasPluginSlotName |
( |
| ) |
|
Definition at line 108 of file ilComponentInfoTest.php.
108 : void
109 {
110 $this->assertTrue($this->component->hasPluginSlotName("Slot1"));
111 $this->assertTrue($this->component->hasPluginSlotName("Slot2"));
112 $this->assertFalse($this->component->hasPluginSlotName("Slot3"));
113 }
◆ testInvalidTypeThrowsException()
| ilComponentInfoTest::testInvalidTypeThrowsException |
( |
| ) |
|
Definition at line 61 of file ilComponentInfoTest.php.
61 : void
62 {
63 $this->expectException(\InvalidArgumentException::class);
64 $slots = [];
66 "id",
67 "SomeOtherType",
68 "name",
69 $slots
70 );
71 }
The documentation for this class was generated from the following file: