ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBuddySystemUnlinkedStateRelationTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
28  {
30  }
31 
32  public function testIsUnlinked(): void
33  {
34  $this->assertTrue($this->relation->isUnlinked());
35  }
36 
37  public function testIsLinked(): void
38  {
39  $this->assertFalse($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->expectException(ilBuddySystemRelationStateException::class);
55  $this->relation->unlink();
56  }
57 
58  public function testCanBeLinked(): void
59  {
60  $this->expectException(ilBuddySystemRelationStateException::class);
61  $this->relation->link();
62  }
63 
64  public function testCanBeRequested(): void
65  {
66  $this->relation->request();
67  $this->assertTrue($this->relation->isRequested());
68  $this->assertTrue($this->relation->wasUnlinked());
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 ilBuddySystemUnlinkedStateRelationTest.
Class ilBuddySystemUnlinkedRelationState.
Class ilBuddySystemBaseStateTest.
Class ilBuddySystemRelationStateCollection A collection of relation states.
Interface ilBuddySystemRelationState.