ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilBuddySystemLinkedStateRelationTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 ilBuddySystemUnlinkedRelationState.
Class ilBuddySystemRelationStateCollection A collection of relation states.
Interface ilBuddySystemRelationState.