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

Public Member Functions

 testHandle ()
 
 testHandleCallBack ()
 
 testAllPropDefaults ()
 
 testSet ()
 
 testSetAllpropCustom ()
 
 testSetUnset ()
 

Detailed Description

Definition at line 5 of file PropFindTest.php.

Member Function Documentation

◆ testAllPropDefaults()

Sabre\DAV\PropFindTest::testAllPropDefaults ( )

Definition at line 31 of file PropFindTest.php.

31 {
32
33 $propFind = new PropFind('foo', ['{DAV:}displayname'], 0, PropFind::ALLPROPS);
34
35 $this->assertEquals([
36 200 => [],
37 ], $propFind->getResultForMultiStatus());
38
39 }
const ALLPROPS
An allprops request.
Definition: PropFind.php:27

References Sabre\DAV\PropFind\ALLPROPS.

◆ testHandle()

Sabre\DAV\PropFindTest::testHandle ( )

Definition at line 7 of file PropFindTest.php.

7 {
8
9 $propFind = new PropFind('foo', ['{DAV:}displayname']);
10 $propFind->handle('{DAV:}displayname', 'foobar');
11
12 $this->assertEquals([
13 200 => ['{DAV:}displayname' => 'foobar'],
14 404 => [],
15 ], $propFind->getResultForMultiStatus());
16
17 }

◆ testHandleCallBack()

Sabre\DAV\PropFindTest::testHandleCallBack ( )

Definition at line 19 of file PropFindTest.php.

19 {
20
21 $propFind = new PropFind('foo', ['{DAV:}displayname']);
22 $propFind->handle('{DAV:}displayname', function() { return 'foobar'; });
23
24 $this->assertEquals([
25 200 => ['{DAV:}displayname' => 'foobar'],
26 404 => [],
27 ], $propFind->getResultForMultiStatus());
28
29 }

◆ testSet()

Sabre\DAV\PropFindTest::testSet ( )

Definition at line 41 of file PropFindTest.php.

41 {
42
43 $propFind = new PropFind('foo', ['{DAV:}displayname']);
44 $propFind->set('{DAV:}displayname', 'bar');
45
46 $this->assertEquals([
47 200 => ['{DAV:}displayname' => 'bar'],
48 404 => [],
49 ], $propFind->getResultForMultiStatus());
50
51 }

◆ testSetAllpropCustom()

Sabre\DAV\PropFindTest::testSetAllpropCustom ( )

Definition at line 53 of file PropFindTest.php.

53 {
54
55 $propFind = new PropFind('foo', ['{DAV:}displayname'], 0, PropFind::ALLPROPS);
56 $propFind->set('{DAV:}customproperty', 'bar');
57
58 $this->assertEquals([
59 200 => ['{DAV:}customproperty' => 'bar'],
60 ], $propFind->getResultForMultiStatus());
61
62 }

References Sabre\DAV\PropFind\ALLPROPS.

◆ testSetUnset()

Sabre\DAV\PropFindTest::testSetUnset ( )

Definition at line 64 of file PropFindTest.php.

64 {
65
66 $propFind = new PropFind('foo', ['{DAV:}displayname']);
67 $propFind->set('{DAV:}displayname', 'bar');
68 $propFind->set('{DAV:}displayname', null);
69
70 $this->assertEquals([
71 200 => [],
72 404 => ['{DAV:}displayname' => null],
73 ], $propFind->getResultForMultiStatus());
74
75 }

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