ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilBuddySystemLinkedStateRelationTest.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->assertFalse($this->relation->isUnlinked());
31 }
32
33 public function testIsLinked(): void
34 {
35 $this->assertTrue($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->relation->unlink();
51 $this->assertTrue($this->relation->isUnlinked());
52 $this->assertTrue($this->relation->wasLinked());
53 }
54
55 public function testCanBeLinked(): void
56 {
57 $this->expectException(ilBuddySystemRelationStateException::class);
58 $this->relation->link();
59 }
60
61 public function testCanBeRequested(): void
62 {
63 $this->expectException(ilBuddySystemRelationStateException::class);
64 $this->relation->request();
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.