ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
StructureSetTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use PHPUnit\Framework\TestCase;
27
28class StructureSetTest extends TestCase
29{
30 protected function getRoot(): StructureElementInterface
31 {
32 return new class () extends NullStructureElement {
33 public function getMDID(): NoID
34 {
35 return NoID::ROOT;
36 }
37
38 public function isRoot(): bool
39 {
40 return true;
41 }
42 };
43 }
44
45 public function testGetRoot(): void
46 {
47 $root = $this->getRoot();
48 $set = new StructureSet($root);
49
50 $this->assertSame($root, $set->getRoot());
51 }
52}