ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilBuddySystemUnlinkedStateRelationTest.php
Go to the documentation of this file.
1<?php
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{
15 public function getInitialState()
16 {
18 }
19
23 public function testIsUnlinked()
24 {
25 $this->assertTrue($this->relation->isUnlinked());
26 }
27
31 public function testIsLinked()
32 {
33 $this->assertFalse($this->relation->isLinked());
34 }
35
39 public function testIsRequested()
40 {
41 $this->assertFalse($this->relation->isRequested());
42 }
43
47 public function testIsIgnored()
48 {
49 $this->assertFalse($this->relation->isIgnored());
50 }
51
55 public function testCanBeUnlinked()
56 {
57 $this->relation->unlink();
58 }
59
63 public function testCanBeLinked()
64 {
65 $this->relation->link();
66 }
67
71 public function testCanBeRequested()
72 {
73 $this->relation->request();
74 $this->assertTrue($this->relation->isRequested());
75 $this->assertTrue($this->relation->wasUnlinked());
76 }
77
81 public function testCanBeIgnored()
82 {
83 $this->relation->ignore();
84 }
85}
Class ilBuddySystemBaseStateTest.
Class ilBuddySystemUnlinkedStateRelationTest.
testCanBeLinked()
@expectedException ilBuddySystemRelationStateException
testCanBeUnlinked()
@expectedException ilBuddySystemRelationStateException
testCanBeIgnored()
@expectedException ilBuddySystemRelationStateException