ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\DAVACL\FS\HomeCollectionTest Class Reference
+ Inheritance diagram for Sabre\DAVACL\FS\HomeCollectionTest:
+ Collaboration diagram for Sabre\DAVACL\FS\HomeCollectionTest:

Public Member Functions

 setUp ()
 
 tearDown ()
 
 testGetName ()
 
 testGetChild ()
 
 testGetOwner ()
 
 testGetGroup ()
 
 testGetACL ()
 
 testSetAcl ()
 @expectedException \Sabre\DAV\Exception\Forbidden More...
 
 testGetSupportedPrivilegeSet ()
 

Protected Attributes

 $sut
 
 $path
 
 $name = 'thuis'
 

Detailed Description

Definition at line 7 of file HomeCollectionTest.php.

Member Function Documentation

◆ setUp()

Sabre\DAVACL\FS\HomeCollectionTest::setUp ( )

Definition at line 19 of file HomeCollectionTest.php.

19 {
20
21 $principalBackend = new PrincipalBackend();
22
23 $this->path = SABRE_TEMPDIR . '/home';
24
25 $this->sut = new HomeCollection($principalBackend, $this->path);
26 $this->sut->collectionName = $this->name;
27
28
29 }
$principalBackend

References Sabre\DAVACL\FS\HomeCollectionTest\$name, and $principalBackend.

◆ tearDown()

Sabre\DAVACL\FS\HomeCollectionTest::tearDown ( )

Definition at line 31 of file HomeCollectionTest.php.

31 {
32
34
35 }
static clearTempDir()
This function deletes all the contents of the temporary directory.
Definition: TestUtil.php:12

References Sabre\TestUtil\clearTempDir().

+ Here is the call graph for this function:

◆ testGetACL()

Sabre\DAVACL\FS\HomeCollectionTest::testGetACL ( )

Definition at line 82 of file HomeCollectionTest.php.

82 {
83
84 $acl = [
85 [
86 'principal' => '{DAV:}authenticated',
87 'privilege' => '{DAV:}read',
88 'protected' => true,
89 ]
90 ];
91
92 $this->assertEquals(
93 $acl,
94 $this->sut->getACL()
95 );
96
97 }

◆ testGetChild()

Sabre\DAVACL\FS\HomeCollectionTest::testGetChild ( )

Definition at line 46 of file HomeCollectionTest.php.

46 {
47
48 $child = $this->sut->getChild('user1');
49 $this->assertInstanceOf('Sabre\\DAVACL\\FS\\Collection', $child);
50 $this->assertEquals('user1', $child->getName());
51
52 $owner = 'principals/user1';
53 $acl = [
54 [
55 'privilege' => '{DAV:}all',
56 'principal' => '{DAV:}owner',
57 'protected' => true,
58 ],
59 ];
60
61 $this->assertEquals($acl, $child->getACL());
62 $this->assertEquals($owner, $child->getOwner());
63
64 }

◆ testGetGroup()

Sabre\DAVACL\FS\HomeCollectionTest::testGetGroup ( )

Definition at line 74 of file HomeCollectionTest.php.

74 {
75
76 $this->assertNull(
77 $this->sut->getGroup()
78 );
79
80 }

◆ testGetName()

Sabre\DAVACL\FS\HomeCollectionTest::testGetName ( )

Definition at line 37 of file HomeCollectionTest.php.

37 {
38
39 $this->assertEquals(
40 $this->name,
41 $this->sut->getName()
42 );
43
44 }

◆ testGetOwner()

Sabre\DAVACL\FS\HomeCollectionTest::testGetOwner ( )

Definition at line 66 of file HomeCollectionTest.php.

66 {
67
68 $this->assertNull(
69 $this->sut->getOwner()
70 );
71
72 }

◆ testGetSupportedPrivilegeSet()

Sabre\DAVACL\FS\HomeCollectionTest::testGetSupportedPrivilegeSet ( )

Definition at line 108 of file HomeCollectionTest.php.

108 {
109
110 $this->assertNull(
111 $this->sut->getSupportedPrivilegeSet()
112 );
113
114 }

◆ testSetAcl()

Sabre\DAVACL\FS\HomeCollectionTest::testSetAcl ( )

@expectedException \Sabre\DAV\Exception\Forbidden

Definition at line 102 of file HomeCollectionTest.php.

102 {
103
104 $this->sut->setACL([]);
105
106 }

Field Documentation

◆ $name

Sabre\DAVACL\FS\HomeCollectionTest::$name = 'thuis'
protected

Definition at line 17 of file HomeCollectionTest.php.

Referenced by Sabre\DAVACL\FS\HomeCollectionTest\setUp().

◆ $path

Sabre\DAVACL\FS\HomeCollectionTest::$path
protected

Definition at line 16 of file HomeCollectionTest.php.

◆ $sut

Sabre\DAVACL\FS\HomeCollectionTest::$sut
protected

Definition at line 14 of file HomeCollectionTest.php.


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