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

Public Member Functions

 getInstance ()
 
 testGetChildren ()
 
 testGetOwner ()
 
 testGetGroup ()
 
 testGetACL ()
 
 testSetACL ()
 @expectedException \Sabre\DAV\Exception\Forbidden More...
 
 testGetSupportedPrivilegeSet ()
 

Protected Attributes

 $caldavBackend
 
 $principalUri
 
 $notification
 

Detailed Description

Definition at line 7 of file CollectionTest.php.

Member Function Documentation

◆ getInstance()

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

Definition at line 13 of file CollectionTest.php.

13 {
14
15 $this->principalUri = 'principals/user1';
16
17 $this->notification = new CalDAV\Xml\Notification\SystemStatus(1, '"1"');
18
19 $this->caldavBackend = new CalDAV\Backend\MockSharing([], [], [
20 'principals/user1' => [
21 $this->notification
22 ]
23 ]);
24
25 return new Collection($this->caldavBackend, $this->principalUri);
26
27 }
notification()
Definition: notification.php:2

References notification().

Referenced by Sabre\CalDAV\Notifications\CollectionTest\testGetACL(), Sabre\CalDAV\Notifications\CollectionTest\testGetChildren(), Sabre\CalDAV\Notifications\CollectionTest\testGetGroup(), Sabre\CalDAV\Notifications\CollectionTest\testGetOwner(), Sabre\CalDAV\Notifications\CollectionTest\testGetSupportedPrivilegeSet(), and Sabre\CalDAV\Notifications\CollectionTest\testSetACL().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testGetACL()

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

Definition at line 54 of file CollectionTest.php.

54 {
55
56 $col = $this->getInstance();
57 $expected = [
58 [
59 'privilege' => '{DAV:}all',
60 'principal' => '{DAV:}owner',
61 'protected' => true,
62 ],
63 ];
64
65 $this->assertEquals($expected, $col->getACL());
66
67 }

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

+ Here is the call graph for this function:

◆ testGetChildren()

Sabre\CalDAV\Notifications\CollectionTest::testGetChildren ( )

Definition at line 29 of file CollectionTest.php.

29 {
30
31 $col = $this->getInstance();
32 $this->assertEquals('notifications', $col->getName());
33
34 $this->assertEquals([
35 new Node($this->caldavBackend, $this->principalUri, $this->notification)
36 ], $col->getChildren());
37
38 }

References Sabre\CalDAV\Notifications\CollectionTest\getInstance(), and notification().

+ Here is the call graph for this function:

◆ testGetGroup()

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

Definition at line 47 of file CollectionTest.php.

47 {
48
49 $col = $this->getInstance();
50 $this->assertNull($col->getGroup());
51
52 }

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

+ Here is the call graph for this function:

◆ testGetOwner()

Sabre\CalDAV\Notifications\CollectionTest::testGetOwner ( )

Definition at line 40 of file CollectionTest.php.

40 {
41
42 $col = $this->getInstance();
43 $this->assertEquals('principals/user1', $col->getOwner());
44
45 }

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

+ Here is the call graph for this function:

◆ testGetSupportedPrivilegeSet()

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

Definition at line 79 of file CollectionTest.php.

79 {
80
81 $col = $this->getInstance();
82 $this->assertNull($col->getSupportedPrivilegeSet());
83
84 }

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

+ Here is the call graph for this function:

◆ testSetACL()

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

@expectedException \Sabre\DAV\Exception\Forbidden

Definition at line 72 of file CollectionTest.php.

72 {
73
74 $col = $this->getInstance();
75 $col->setACL([]);
76
77 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $caldavBackend

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

Definition at line 9 of file CollectionTest.php.

◆ $notification

Sabre\CalDAV\Notifications\CollectionTest::$notification
protected

Definition at line 11 of file CollectionTest.php.

◆ $principalUri

Sabre\CalDAV\Notifications\CollectionTest::$principalUri
protected

Definition at line 10 of file CollectionTest.php.


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