21 $pdo->exec(
"INSERT INTO propertystorage (path, name, valuetype, value) VALUES ('dir', '{DAV:}displayname', 1, 'Directory')");
31 $propFind =
new PropFind(
'dir', [
'{DAV:}displayname']);
32 $backend->propFind(
'dir', $propFind);
34 $this->assertEquals(
'Directory', $propFind->get(
'{DAV:}displayname'));
42 $propFind =
new PropFind(
'dir', [
'{DAV:}displayname']);
43 $propFind->set(
'{DAV:}displayname',
'foo');
44 $backend->propFind(
'dir', $propFind);
46 $this->assertEquals(
'foo', $propFind->get(
'{DAV:}displayname'));
57 $propPatch =
new PropPatch([
'{DAV:}displayname' =>
'bar']);
58 $backend->propPatch(
'dir', $propPatch);
61 $propFind =
new PropFind(
'dir', [
'{DAV:}displayname']);
62 $backend->propFind(
'dir', $propFind);
64 $this->assertEquals(
'bar', $propFind->get(
'{DAV:}displayname'));
75 $complex =
new Complex(
'<foo xmlns="DAV:">somevalue</foo>');
77 $propPatch =
new PropPatch([
'{DAV:}complex' => $complex]);
78 $backend->propPatch(
'dir', $propPatch);
81 $propFind =
new PropFind(
'dir', [
'{DAV:}complex']);
82 $backend->propFind(
'dir', $propFind);
84 $this->assertEquals($complex, $propFind->get(
'{DAV:}complex'));
96 $custom =
new Href(
'/foo/bar/');
98 $propPatch =
new PropPatch([
'{DAV:}custom' => $custom]);
99 $backend->propPatch(
'dir', $propPatch);
100 $propPatch->commit();
102 $propFind =
new PropFind(
'dir', [
'{DAV:}custom']);
103 $backend->propFind(
'dir', $propFind);
105 $this->assertEquals($custom, $propFind->get(
'{DAV:}custom'));
116 $propPatch =
new PropPatch([
'{DAV:}displayname' => null]);
117 $backend->propPatch(
'dir', $propPatch);
118 $propPatch->commit();
120 $propFind =
new PropFind(
'dir', [
'{DAV:}displayname']);
121 $backend->propFind(
'dir', $propFind);
123 $this->assertEquals(null, $propFind->get(
'{DAV:}displayname'));
133 $backend->delete(
'dir');
135 $propFind =
new PropFind(
'dir', [
'{DAV:}displayname']);
136 $backend->propFind(
'dir', $propFind);
138 $this->assertEquals(null, $propFind->get(
'{DAV:}displayname'));
149 $propPatch =
new PropPatch([
'{DAV:}displayname' =>
'child']);
150 $backend->propPatch(
'dir/child', $propPatch);
151 $propPatch->commit();
153 $backend->move(
'dir',
'dir2');
156 $propFind =
new PropFind(
'dir', [
'{DAV:}displayname']);
157 $backend->propFind(
'dir', $propFind);
158 $this->assertEquals(null, $propFind->get(
'{DAV:}displayname'));
161 $propFind =
new PropFind(
'dir/child', [
'{DAV:}displayname']);
162 $backend->propFind(
'dir/child', $propFind);
163 $this->assertEquals(null, $propFind->get(
'{DAV:}displayname'));
166 $propFind =
new PropFind(
'dir2', [
'{DAV:}displayname']);
167 $backend->propFind(
'dir2', $propFind);
168 $this->assertEquals(
'Directory', $propFind->get(
'{DAV:}displayname'));
171 $propFind =
new PropFind(
'dir2/child', [
'{DAV:}displayname']);
172 $backend->propFind(
'dir2/child', $propFind);
173 $this->assertEquals(
'child', $propFind->get(
'{DAV:}displayname'));
182 $propPatch =
new PropPatch([
'{DAV:}displayname' =>
'child']);
183 $backend->propPatch(
'dir/child', $propPatch);
184 $propPatch->commit();
185 $backend->delete(
'dir');
187 $propFind =
new PropFind(
'dir/child', [
'{DAV:}displayname']);
188 $backend->propFind(
'dir/child', $propFind);
190 $this->assertEquals(null, $propFind->get(
'{DAV:}displayname'));
testPropPatchUpdate()
testPropFind
This class represents a set of properties that are going to be updated.
testPropPatchCustom()
testPropPatchComplex
This class holds all the information about a PROPFIND request.
testPropFindNothingToDo()
dropTables($tableNames)
Drops tables, if they exist.
testDeepDelete()
testPropFind
testPropPatchComplex()
testPropPatchUpdate
createSchema($schemaName)
Uses .sql files from the examples directory to initialize the database.
testPropPatchRemove()
testPropFind