Definition at line 29 of file ComponentEntriesTest.php.
◆ setUp()
ComponentEntriesTest::setUp |
( |
| ) |
|
|
protected |
Definition at line 39 of file ComponentEntriesTest.php.
41 $this->entries_data = include
"components/ILIAS/UI/tests/Crawler/Fixture/EntriesFixture.php";
42 $this->entries =
new Entries();
43 $this->entry_data = include
"components/ILIAS/UI/tests/Crawler/Fixture/EntryFixture.php";
44 $this->entry =
new Entry($this->entry_data);
45 $this->entries->addEntriesFromArray($this->entries_data);
◆ testAddEntries()
ComponentEntriesTest::testAddEntries |
( |
| ) |
|
Definition at line 66 of file ComponentEntriesTest.php.
76 $new_entries =
new Entries();
77 $new_entries->addEntries($this->entries);
78 $this->assertEquals(2, $new_entries->count());
◆ testAddEntry()
ComponentEntriesTest::testAddEntry |
( |
| ) |
|
◆ testAddFromArray()
ComponentEntriesTest::testAddFromArray |
( |
| ) |
|
Definition at line 81 of file ComponentEntriesTest.php.
83 $entries_emtpy =
new Entries();
85 $this->assertEquals($entries_emtpy,
$entries);
87 $this->assertEquals($entries_emtpy,
$entries);
88 $entries->addEntriesFromArray($this->entries_data);
89 $this->assertEquals(
$entries, $this->entries);
◆ testConstruct()
ComponentEntriesTest::testConstruct |
( |
| ) |
|
◆ testGetChildrenOfEntry()
ComponentEntriesTest::testGetChildrenOfEntry |
( |
| ) |
|
Definition at line 155 of file ComponentEntriesTest.php.
157 $this->assertEquals([$this->entries->getEntryById(
"Entry2")], $this->entries->getChildrenOfEntry(
"Entry1"));
158 $this->assertEquals([], $this->entries->getDescendantsOfEntryTitles(
"Entry2"));
◆ testGetDescendantsOfEntries()
ComponentEntriesTest::testGetDescendantsOfEntries |
( |
| ) |
|
Definition at line 143 of file ComponentEntriesTest.php.
145 $this->assertEquals([
'Entry2'], $this->entries->getDescendantsOfEntry(
"Entry1"));
146 $this->assertEquals([], $this->entries->getDescendantsOfEntry(
"Entry2"));
◆ testGetDescendantsOfEntryTitles()
ComponentEntriesTest::testGetDescendantsOfEntryTitles |
( |
| ) |
|
Definition at line 149 of file ComponentEntriesTest.php.
151 $this->assertEquals([
'Entry2' =>
'Entry2Title'], $this->entries->getDescendantsOfEntryTitles(
"Entry1"));
152 $this->assertEquals([], $this->entries->getDescendantsOfEntryTitles(
"Entry2"));
◆ testGetEntryById()
ComponentEntriesTest::testGetEntryById |
( |
| ) |
|
Definition at line 113 of file ComponentEntriesTest.php.
References Vendor\Package\$e.
118 $this->assertFalse(
"this should not happen");
120 $this->assertTrue(
true);
122 $this->assertEquals(
new Entry($this->entries_data[
"Entry2"]), $this->entries->getEntryById(
"Entry2"));
◆ testGetParentsOfEntry()
ComponentEntriesTest::testGetParentsOfEntry |
( |
| ) |
|
Definition at line 125 of file ComponentEntriesTest.php.
127 $this->assertEquals([], $this->entries->getParentsOfEntry(
"Entry1"));
128 $this->assertEquals([
"Entry1"], $this->entries->getParentsOfEntry(
"Entry2"));
◆ testGetParentsOfEntryTitles()
ComponentEntriesTest::testGetParentsOfEntryTitles |
( |
| ) |
|
Definition at line 137 of file ComponentEntriesTest.php.
139 $this->assertEquals([], $this->entries->getParentsOfEntryTitles(
"Entry1"));
140 $this->assertEquals([
'Entry1' =>
'Entry1Title'], $this->entries->getParentsOfEntryTitles(
"Entry2"));
◆ testGetRootEntry()
ComponentEntriesTest::testGetRootEntry |
( |
| ) |
|
Definition at line 101 of file ComponentEntriesTest.php.
References Vendor\Package\$e.
106 $this->assertFalse(
"this should not happen");
108 $this->assertTrue(
true);
110 $this->assertEquals(
new Entry($this->entries_data[
"Entry1"]), $this->entries->getRootEntry());
◆ testGetRootEntryId()
ComponentEntriesTest::testGetRootEntryId |
( |
| ) |
|
Definition at line 92 of file ComponentEntriesTest.php.
95 $this->assertEquals(
"root",
$entries->getRootEntryId());
97 $this->assertEquals(
"root2",
$entries->getRootEntryId());
98 $this->assertEquals(
"Entry1", $this->entries->getRootEntryId());
◆ testIsParentOfEntry()
ComponentEntriesTest::testIsParentOfEntry |
( |
| ) |
|
Definition at line 131 of file ComponentEntriesTest.php.
133 $this->assertEquals(
false, $this->entries->isParentOfEntry(
"Entry2",
"Entry1"));
134 $this->assertEquals(
true, $this->entries->isParentOfEntry(
"Entry1",
"Entry2"));
◆ testJsonSerialize()
ComponentEntriesTest::testJsonSerialize |
( |
| ) |
|
Definition at line 161 of file ComponentEntriesTest.php.
165 $this->assertEquals([],
$entries->jsonSerialize());
166 $this->assertEquals($this->entries_data, $this->entries->jsonSerialize());
◆ $entries
Entries ComponentEntriesTest::$entries |
|
protected |
◆ $entries_data
ComponentEntriesTest::$entries_data |
|
protected |
◆ $entry
Entry ComponentEntriesTest::$entry |
|
protected |
◆ $entry_data
array ComponentEntriesTest::$entry_data |
|
protected |
The documentation for this class was generated from the following file: