ILIAS  release_7 Revision v7.30-3-g800a261c036
ilBuddySystemRequestIgnoredStateRelationTest.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->assertFalse($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->assertTrue($this->relation->isIgnored());
50 }
51
55 public function testCanBeUnlinked() : void
56 {
57 $this->relation->unlink();
58 $this->assertTrue($this->relation->isUnlinked());
59 $this->assertTrue($this->relation->wasIgnored());
60 }
61
65 public function testCanBeLinked() : void
66 {
67 $this->relation->link();
68 $this->assertTrue($this->relation->isLinked());
69 $this->assertTrue($this->relation->wasIgnored());
70 }
71
75 public function testCanBeRequested() : void
76 {
77 $this->expectException(ilBuddySystemRelationStateException::class);
78 $this->relation->request();
79 }
80
84 public function testCanBeIgnored() : void
85 {
86 $this->expectException(ilBuddySystemRelationStateException::class);
87 $this->relation->ignore();
88 }
89}
An exception for terminatinating execution or to throw for unit testing.
Class ilBuddySystemBaseStateTest.
Interface ilBuddySystemRelationState.