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

Public Member Functions

 setUp ()
 
 tearDown ()
 
 testGetChildFile ()
 
 testGetChildDirectory ()
 
- Public Member Functions inherited from Sabre\DAVACL\FS\FileTest
 setUp ()
 
 testGetOwner ()
 
 testGetGroup ()
 
 testGetACL ()
 
 testSetAcl ()
 
 testGetSupportedPrivilegeSet ()
 

Additional Inherited Members

- Protected Attributes inherited from Sabre\DAVACL\FS\FileTest
 $sut
 
 $path = 'foo'
 
 $acl
 
 $owner = 'principals/evert'
 

Detailed Description

Definition at line 5 of file CollectionTest.php.

Member Function Documentation

◆ setUp()

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

Definition at line 7 of file CollectionTest.php.

7  {
8 
9  $this->path = SABRE_TEMPDIR;
10  $this->sut = new Collection($this->path, $this->acl, $this->owner);
11 
12  }

◆ tearDown()

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

Definition at line 14 of file CollectionTest.php.

References Sabre\TestUtil\clearTempDir().

14  {
15 
17 
18  }
static clearTempDir()
This function deletes all the contents of the temporary directory.
Definition: TestUtil.php:12
+ Here is the call graph for this function:

◆ testGetChildDirectory()

Sabre\DAVACL\FS\CollectionTest::testGetChildDirectory ( )

Definition at line 32 of file CollectionTest.php.

32  {
33 
34  mkdir(SABRE_TEMPDIR . '/dir');
35  $child = $this->sut->getChild('dir');
36  $this->assertInstanceOf('Sabre\\DAVACL\\FS\\Collection', $child);
37 
38  $this->assertEquals('dir', $child->getName());
39  $this->assertEquals($this->acl, $child->getACL());
40  $this->assertEquals($this->owner, $child->getOwner());
41 
42  }

◆ testGetChildFile()

Sabre\DAVACL\FS\CollectionTest::testGetChildFile ( )

Definition at line 20 of file CollectionTest.php.

20  {
21 
22  file_put_contents(SABRE_TEMPDIR . '/file.txt', 'hello');
23  $child = $this->sut->getChild('file.txt');
24  $this->assertInstanceOf('Sabre\\DAVACL\\FS\\File', $child);
25 
26  $this->assertEquals('file.txt', $child->getName());
27  $this->assertEquals($this->acl, $child->getACL());
28  $this->assertEquals($this->owner, $child->getOwner());
29 
30  }

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