ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilBuddySystemRequestedStateRelationTest.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->assertFalse($this->relation->isLinked());
36 }
37
38 public function testIsRequested(): void
39 {
40 $this->assertTrue($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->wasRequested());
53 }
54
55 public function testCanBeLinked(): void
56 {
57 $this->relation->link();
58 $this->assertTrue($this->relation->isLinked());
59 $this->assertTrue($this->relation->wasRequested());
60 }
61
62 public function testCanBeRequested(): void
63 {
64 $this->expectException(ilBuddySystemRelationStateException::class);
65 $this->relation->request();
66 }
67
68 public function testCanBeIgnored(): void
69 {
70 $this->relation->ignore();
71 $this->assertTrue($this->relation->isIgnored());
72 }
73
74 public function testPossibleTargetStates(): void
75 {
76 $this->assertTrue(
77 $this->relation->getState()
78 ->getPossibleTargetStates()
83 ]))
84 );
85 }
86}
Class ilBuddySystemRelationStateCollection A collection of relation states.
Interface ilBuddySystemRelationState.