ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
SetTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use PHPUnit\Framework\TestCase;
33
34class SetTest extends TestCase
35{
36 protected function getRoot(): ElementInterface
37 {
38 return new class () extends NullElement {
39 public function getMDID(): NoID|int
40 {
41 return NoID::ROOT;
42 }
43
44 public function isRoot(): bool
45 {
46 return true;
47 }
48 };
49 }
50
51 public function testGetRoot(): void
52 {
53 $root = $this->getRoot();
54 $set = new Set(new NullRessourceID(), $root);
55
56 $this->assertSame($root, $set->getRoot());
57 }
58
59 public function testGetRessourceID(): void
60 {
61 $root = $this->getRoot();
62 $id = new NullRessourceID();
63 $set = new Set($id, $root);
64
65 $this->assertSame($id, $set->getRessourceID());
66 }
67}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23