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