ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilBuddySystemRequestIgnoredStateRelationTest.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->assertFalse($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->assertTrue($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->wasIgnored());
53  }
54 
55  public function testCanBeLinked(): void
56  {
57  $this->relation->link();
58  $this->assertTrue($this->relation->isLinked());
59  $this->assertTrue($this->relation->wasIgnored());
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->expectException(ilBuddySystemRelationStateException::class);
71  $this->relation->ignore();
72  }
73 
74  public function testPossibleTargetStates(): void
75  {
76  $this->assertTrue(
77  $this->relation->getState()
78  ->getPossibleTargetStates()
82  ]))
83  );
84  }
85 }
Class ilBuddySystemUnlinkedRelationState.
Class ilBuddySystemRelationStateCollection A collection of relation states.