ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\CalDAV\Notifications\NodeTest Class Reference
+ Inheritance diagram for Sabre\CalDAV\Notifications\NodeTest:
+ Collaboration diagram for Sabre\CalDAV\Notifications\NodeTest:

Public Member Functions

 getInstance ()
 
 testGetId ()
 
 testGetEtag ()
 
 testGetNotificationType ()
 
 testDelete ()
 
 testGetGroup ()
 
 testGetACL ()
 
 testSetACL ()
 
 testGetSupportedPrivilegeSet ()
 

Protected Attributes

 $systemStatus
 
 $caldavBackend
 

Detailed Description

Definition at line 7 of file NodeTest.php.

Member Function Documentation

◆ getInstance()

Sabre\CalDAV\Notifications\NodeTest::getInstance ( )

Definition at line 12 of file NodeTest.php.

Referenced by Sabre\CalDAV\Notifications\NodeTest\testDelete(), Sabre\CalDAV\Notifications\NodeTest\testGetACL(), Sabre\CalDAV\Notifications\NodeTest\testGetEtag(), Sabre\CalDAV\Notifications\NodeTest\testGetGroup(), Sabre\CalDAV\Notifications\NodeTest\testGetId(), Sabre\CalDAV\Notifications\NodeTest\testGetNotificationType(), Sabre\CalDAV\Notifications\NodeTest\testGetSupportedPrivilegeSet(), and Sabre\CalDAV\Notifications\NodeTest\testSetACL().

12  {
13 
14  $principalUri = 'principals/user1';
15 
16  $this->systemStatus = new CalDAV\Xml\Notification\SystemStatus(1, '"1"');
17 
18  $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [
19  'principals/user1' => [
20  $this->systemStatus
21  ]
22  ]);
23 
24  $node = new Node($this->caldavBackend, 'principals/user1', $this->systemStatus);
25  return $node;
26 
27  }
+ Here is the caller graph for this function:

◆ testDelete()

Sabre\CalDAV\Notifications\NodeTest::testDelete ( )

Definition at line 50 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

50  {
51 
52  $node = $this->getInstance();
53  $node->delete();
54  $this->assertEquals([], $this->caldavBackend->getNotificationsForPrincipal('principals/user1'));
55 
56  }
+ Here is the call graph for this function:

◆ testGetACL()

Sabre\CalDAV\Notifications\NodeTest::testGetACL ( )

Definition at line 65 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

65  {
66 
67  $node = $this->getInstance();
68  $expected = [
69  [
70  'privilege' => '{DAV:}all',
71  'principal' => '{DAV:}owner',
72  'protected' => true,
73  ],
74  ];
75 
76  $this->assertEquals($expected, $node->getACL());
77 
78  }
+ Here is the call graph for this function:

◆ testGetEtag()

Sabre\CalDAV\Notifications\NodeTest::testGetEtag ( )

Definition at line 36 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

36  {
37 
38  $node = $this->getInstance();
39  $this->assertEquals('"1"', $node->getETag());
40 
41  }
+ Here is the call graph for this function:

◆ testGetGroup()

Sabre\CalDAV\Notifications\NodeTest::testGetGroup ( )

Definition at line 58 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

58  {
59 
60  $node = $this->getInstance();
61  $this->assertNull($node->getGroup());
62 
63  }
+ Here is the call graph for this function:

◆ testGetId()

Sabre\CalDAV\Notifications\NodeTest::testGetId ( )

Definition at line 29 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

29  {
30 
31  $node = $this->getInstance();
32  $this->assertEquals($this->systemStatus->getId() . '.xml', $node->getName());
33 
34  }
+ Here is the call graph for this function:

◆ testGetNotificationType()

Sabre\CalDAV\Notifications\NodeTest::testGetNotificationType ( )

Definition at line 43 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

43  {
44 
45  $node = $this->getInstance();
46  $this->assertEquals($this->systemStatus, $node->getNotificationType());
47 
48  }
+ Here is the call graph for this function:

◆ testGetSupportedPrivilegeSet()

Sabre\CalDAV\Notifications\NodeTest::testGetSupportedPrivilegeSet ( )

Definition at line 90 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

90  {
91 
92  $node = $this->getInstance();
93  $this->assertNull($node->getSupportedPrivilegeSet());
94 
95  }
+ Here is the call graph for this function:

◆ testSetACL()

Sabre\CalDAV\Notifications\NodeTest::testSetACL ( )

Definition at line 83 of file NodeTest.php.

References Sabre\CalDAV\Notifications\NodeTest\getInstance().

83  {
84 
85  $node = $this->getInstance();
86  $node->setACL([]);
87 
88  }
+ Here is the call graph for this function:

Field Documentation

◆ $caldavBackend

Sabre\CalDAV\Notifications\NodeTest::$caldavBackend
protected

Definition at line 10 of file NodeTest.php.

◆ $systemStatus

Sabre\CalDAV\Notifications\NodeTest::$systemStatus
protected

Definition at line 9 of file NodeTest.php.


The documentation for this class was generated from the following file: