ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilBuddySystemUnlinkedStateRelationTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
24 {
26 }
27
28 public function testIsUnlinked(): void
29 {
30 $this->assertTrue($this->relation->isUnlinked());
31 }
32
33 public function testIsLinked(): void
34 {
35 $this->assertFalse($this->relation->isLinked());
36 }
37
38 public function testIsRequested(): void
39 {
40 $this->assertFalse($this->relation->isRequested());
41 }
42
43 public function testIsIgnored(): void
44 {
45 $this->assertFalse($this->relation->isIgnored());
46 }
47
48 public function testCanBeUnlinked(): void
49 {
50 $this->expectException(ilBuddySystemRelationStateException::class);
51 $this->relation->unlink();
52 }
53
54 public function testCanBeLinked(): void
55 {
56 $this->expectException(ilBuddySystemRelationStateException::class);
57 $this->relation->link();
58 }
59
60 public function testCanBeRequested(): void
61 {
62 $this->relation->request();
63 $this->assertTrue($this->relation->isRequested());
64 $this->assertTrue($this->relation->wasUnlinked());
65 }
66
67 public function testCanBeIgnored(): void
68 {
69 $this->expectException(ilBuddySystemRelationStateException::class);
70 $this->relation->ignore();
71 }
72
73 public function testPossibleTargetStates(): void
74 {
75 $this->assertTrue(
76 $this->relation->getState()
77 ->getPossibleTargetStates()
80 ]))
81 );
82 }
83}
Class ilBuddySystemRelationStateCollection A collection of relation states.
Interface ilBuddySystemRelationState.