ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilBuddySystemUnlinkedStateRelationTest.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once 'Services/Contact/BuddySystem/test/states/ilBuddySystemBaseStateTest.php';
5
11{
16 {
18 }
19
23 public function testIsUnlinked() : void
24 {
25 $this->assertTrue($this->relation->isUnlinked());
26 }
27
31 public function testIsLinked() : void
32 {
33 $this->assertFalse($this->relation->isLinked());
34 }
35
39 public function testIsRequested() : void
40 {
41 $this->assertFalse($this->relation->isRequested());
42 }
43
47 public function testIsIgnored() : void
48 {
49 $this->assertFalse($this->relation->isIgnored());
50 }
51
55 public function testCanBeUnlinked() : void
56 {
57 $this->expectException(ilBuddySystemRelationStateException::class);
58 $this->relation->unlink();
59 }
60
64 public function testCanBeLinked() : void
65 {
66 $this->expectException(ilBuddySystemRelationStateException::class);
67 $this->relation->link();
68 }
69
73 public function testCanBeRequested() : void
74 {
75 $this->relation->request();
76 $this->assertTrue($this->relation->isRequested());
77 $this->assertTrue($this->relation->wasUnlinked());
78 }
79
83 public function testCanBeIgnored() : void
84 {
85 $this->expectException(ilBuddySystemRelationStateException::class);
86 $this->relation->ignore();
87 }
88}
An exception for terminatinating execution or to throw for unit testing.
Class ilBuddySystemBaseStateTest.
Class ilBuddySystemUnlinkedStateRelationTest.
Interface ilBuddySystemRelationState.