ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilBuddySystemRequestIgnoredStateRelationTest.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2015 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/Contact/BuddySystem/test/states/ilBuddySystemBaseStateTest.php';
5 
11 {
15  public function getInitialState()
16  {
18  }
19 
23  public function testIsUnlinked()
24  {
25  $this->assertFalse($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->assertTrue($this->relation->isIgnored());
50  }
51 
55  public function testCanBeUnlinked()
56  {
57  $this->relation->unlink();
58  $this->assertTrue($this->relation->isUnlinked());
59  $this->assertTrue($this->relation->wasIgnored());
60  }
61 
65  public function testCanBeLinked()
66  {
67  $this->relation->link();
68  $this->assertTrue($this->relation->isLinked());
69  $this->assertTrue($this->relation->wasIgnored());
70  }
71 
75  public function testCanBeRequested()
76  {
77  $this->assertException(ilBuddySystemRelationStateException::class);
78  $this->relation->request();
79  }
80 
84  public function testCanBeIgnored()
85  {
86  $this->assertException(ilBuddySystemRelationStateException::class);
87  $this->relation->ignore();
88  }
89 }
assertException($exception_class)
Class ilBuddySystemRequestIgnoredStateRelationTest.
Class ilBuddySystemBaseStateTest.