Definition at line 5 of file PropPatchTest.php.
◆ setUp()
Sabre\DAV\PropPatchTest::setUp |
( |
| ) |
|
Definition at line 9 of file PropPatchTest.php.
11 $this->propPatch =
new PropPatch([
12 '{DAV:}displayname' =>
'foo',
14 $this->assertEquals([
'{DAV:}displayname' =>
'foo'], $this->propPatch->getMutations());
◆ testCommitNoHandler()
Sabre\DAV\PropPatchTest::testCommitNoHandler |
( |
| ) |
|
Definition at line 164 of file PropPatchTest.php.
References $result.
166 $this->assertFalse($this->propPatch->commit());
167 $result = $this->propPatch->getResult();
168 $this->assertEquals([
'{DAV:}displayname' => 403], $result);
◆ testDependencyFail()
Sabre\DAV\PropPatchTest::testDependencyFail |
( |
| ) |
|
◆ testHandleMultiValueBroken()
Sabre\DAV\PropPatchTest::testHandleMultiValueBroken |
( |
| ) |
|
◆ testHandleMultiValueCustomResult()
Sabre\DAV\PropPatchTest::testHandleMultiValueCustomResult |
( |
| ) |
|
◆ testHandleMultiValueFail()
Sabre\DAV\PropPatchTest::testHandleMultiValueFail |
( |
| ) |
|
◆ testHandleMultiValueSuccess()
Sabre\DAV\PropPatchTest::testHandleMultiValueSuccess |
( |
| ) |
|
◆ testHandleNothing()
Sabre\DAV\PropPatchTest::testHandleNothing |
( |
| ) |
|
Definition at line 92 of file PropPatchTest.php.
96 $this->propPatch->handle(
'{DAV:}foobar',
function($value) use (&$hasRan) {
100 $this->assertFalse($hasRan);
◆ testHandleRemaining()
Sabre\DAV\PropPatchTest::testHandleRemaining |
( |
| ) |
|
testHandleSingleSuccess
Definition at line 107 of file PropPatchTest.php.
References $result.
111 $this->propPatch->handleRemaining(
function($mutations) use (&$hasRan) {
113 $this->assertEquals([
'{DAV:}displayname' =>
'foo'], $mutations);
117 $this->assertTrue($this->propPatch->commit());
118 $result = $this->propPatch->getResult();
119 $this->assertEquals([
'{DAV:}displayname' => 200], $result);
121 $this->assertTrue($hasRan);
◆ testHandleRemainingNothingToDo()
Sabre\DAV\PropPatchTest::testHandleRemainingNothingToDo |
( |
| ) |
|
Definition at line 124 of file PropPatchTest.php.
128 $this->propPatch->handle(
'{DAV:}displayname',
function() {});
129 $this->propPatch->handleRemaining(
function($mutations) use (&$hasRan) {
133 $this->assertFalse($hasRan);
◆ testHandlerNotCalled()
Sabre\DAV\PropPatchTest::testHandlerNotCalled |
( |
| ) |
|
Definition at line 172 of file PropPatchTest.php.
176 $this->propPatch->setResultCode(
'{DAV:}displayname', 402);
177 $this->propPatch->handle(
'{DAV:}displayname',
function($value) use (&$hasRan) {
181 $this->propPatch->commit();
184 $this->assertFalse($hasRan);
◆ testHandleSingleBrokenResult()
Sabre\DAV\PropPatchTest::testHandleSingleBrokenResult |
( |
| ) |
|
◆ testHandleSingleCustomResult()
Sabre\DAV\PropPatchTest::testHandleSingleCustomResult |
( |
| ) |
|
Definition at line 54 of file PropPatchTest.php.
References $result.
58 $this->propPatch->handle(
'{DAV:}displayname',
function($value) use (&$hasRan) {
60 $this->assertEquals(
'foo', $value);
64 $this->assertTrue($this->propPatch->commit());
65 $result = $this->propPatch->getResult();
66 $this->assertEquals([
'{DAV:}displayname' => 201], $result);
68 $this->assertTrue($hasRan);
◆ testHandleSingleDeleteSuccess()
Sabre\DAV\PropPatchTest::testHandleSingleDeleteSuccess |
( |
| ) |
|
Definition at line 72 of file PropPatchTest.php.
References $result.
76 $this->propPatch =
new PropPatch([
'{DAV:}displayname' => null]);
77 $this->propPatch->handle(
'{DAV:}displayname',
function($value) use (&$hasRan) {
79 $this->assertNull($value);
83 $this->assertTrue($this->propPatch->commit());
84 $result = $this->propPatch->getResult();
85 $this->assertEquals([
'{DAV:}displayname' => 204], $result);
87 $this->assertTrue($hasRan);
◆ testHandleSingleFail()
Sabre\DAV\PropPatchTest::testHandleSingleFail |
( |
| ) |
|
Definition at line 36 of file PropPatchTest.php.
References $result.
40 $this->propPatch->handle(
'{DAV:}displayname',
function($value) use (&$hasRan) {
42 $this->assertEquals(
'foo', $value);
46 $this->assertFalse($this->propPatch->commit());
47 $result = $this->propPatch->getResult();
48 $this->assertEquals([
'{DAV:}displayname' => 403], $result);
50 $this->assertTrue($hasRan);
◆ testHandleSingleSuccess()
Sabre\DAV\PropPatchTest::testHandleSingleSuccess |
( |
| ) |
|
Definition at line 18 of file PropPatchTest.php.
References $result.
22 $this->propPatch->handle(
'{DAV:}displayname',
function($value) use (&$hasRan) {
24 $this->assertEquals(
'foo', $value);
28 $this->assertTrue($this->propPatch->commit());
29 $result = $this->propPatch->getResult();
30 $this->assertEquals([
'{DAV:}displayname' => 200], $result);
32 $this->assertTrue($hasRan);
◆ testSetRemainingResultCode()
Sabre\DAV\PropPatchTest::testSetRemainingResultCode |
( |
| ) |
|
Definition at line 155 of file PropPatchTest.php.
References $result.
157 $this->propPatch->setRemainingResultCode(204);
158 $this->assertTrue($this->propPatch->commit());
159 $result = $this->propPatch->getResult();
160 $this->assertEquals([
'{DAV:}displayname' => 204], $result);
◆ testSetResultCode()
Sabre\DAV\PropPatchTest::testSetResultCode |
( |
| ) |
|
Definition at line 137 of file PropPatchTest.php.
References $result.
139 $this->propPatch->setResultCode(
'{DAV:}displayname', 201);
140 $this->assertTrue($this->propPatch->commit());
141 $result = $this->propPatch->getResult();
142 $this->assertEquals([
'{DAV:}displayname' => 201], $result);
◆ testSetResultCodeFail()
Sabre\DAV\PropPatchTest::testSetResultCodeFail |
( |
| ) |
|
Definition at line 146 of file PropPatchTest.php.
References $result.
148 $this->propPatch->setResultCode(
'{DAV:}displayname', 402);
149 $this->assertFalse($this->propPatch->commit());
150 $result = $this->propPatch->getResult();
151 $this->assertEquals([
'{DAV:}displayname' => 402], $result);
◆ $propPatch
Sabre\DAV\PropPatchTest::$propPatch |
|
protected |
The documentation for this class was generated from the following file: