ILIAS  release_8 Revision v8.24
ilBuddySystemRequestIgnoredStateRelationTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
28 {
30 }
31
32 public function testIsUnlinked(): void
33 {
34 $this->assertFalse($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->assertTrue($this->relation->isIgnored());
50 }
51
52 public function testCanBeUnlinked(): void
53 {
54 $this->relation->unlink();
55 $this->assertTrue($this->relation->isUnlinked());
56 $this->assertTrue($this->relation->wasIgnored());
57 }
58
59 public function testCanBeLinked(): void
60 {
61 $this->relation->link();
62 $this->assertTrue($this->relation->isLinked());
63 $this->assertTrue($this->relation->wasIgnored());
64 }
65
66 public function testCanBeRequested(): void
67 {
68 $this->expectException(ilBuddySystemRelationStateException::class);
69 $this->relation->request();
70 }
71
72 public function testCanBeIgnored(): void
73 {
74 $this->expectException(ilBuddySystemRelationStateException::class);
75 $this->relation->ignore();
76 }
77
78 public function testPossibleTargetStates(): void
79 {
80 $this->assertTrue(
81 $this->relation->getState()
82 ->getPossibleTargetStates()
86 ]))
87 );
88 }
89}
Class ilBuddySystemBaseStateTest.
Class ilBuddySystemRelationStateCollection A collection of relation states.
Interface ilBuddySystemRelationState.