Definition at line 11 of file MSWordTest.php.
◆ getLockRequest()
Sabre\DAV\Locks\MSWordTest::getLockRequest |
( |
| ) |
|
Definition at line 63 of file MSWordTest.php.
References $request, and Sabre\HTTP\Sapi\createFromServerArray().
Referenced by Sabre\DAV\Locks\MSWordTest\testLockEtc().
66 'REQUEST_METHOD' =>
'LOCK',
67 'HTTP_CONTENT_TYPE' =>
'application/xml',
68 'HTTP_TIMEOUT' =>
'Second-3600',
69 'REQUEST_URI' =>
'/Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx',
72 $request->setBody(
'<D:lockinfo xmlns:D="DAV:"> 80 <D:href>PC-Vista\User</D:href> foreach($paths as $path) $request
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ getLockRequest2()
Sabre\DAV\Locks\MSWordTest::getLockRequest2 |
( |
| ) |
|
Definition at line 87 of file MSWordTest.php.
References $request, and Sabre\HTTP\Sapi\createFromServerArray().
Referenced by Sabre\DAV\Locks\MSWordTest\testLockEtc().
90 'REQUEST_METHOD' =>
'LOCK',
91 'HTTP_CONTENT_TYPE' =>
'application/xml',
92 'HTTP_TIMEOUT' =>
'Second-3600',
93 'REQUEST_URI' =>
'/~$Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx',
96 $request->setBody(
'<D:lockinfo xmlns:D="DAV:"> 104 <D:href>PC-Vista\User</D:href> foreach($paths as $path) $request
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ getPutRequest()
Sabre\DAV\Locks\MSWordTest::getPutRequest |
( |
|
$lockToken | ) |
|
◆ tearDown()
Sabre\DAV\Locks\MSWordTest::tearDown |
( |
| ) |
|
◆ testLockEtc()
Sabre\DAV\Locks\MSWordTest::testLockEtc |
( |
| ) |
|
Definition at line 19 of file MSWordTest.php.
References $server, $tree, Sabre\DAV\Locks\MSWordTest\getLockRequest(), Sabre\DAV\Locks\MSWordTest\getLockRequest2(), and Sabre\DAV\Locks\MSWordTest\getPutRequest().
21 mkdir(SABRE_TEMPDIR .
'/mstest');
22 $tree =
new DAV\FS\Directory(SABRE_TEMPDIR .
'/mstest');
25 $server->debugExceptions =
true;
26 $locksBackend =
new Backend\File(SABRE_TEMPDIR .
'/locksdb');
27 $locksPlugin =
new Plugin($locksBackend);
28 $server->addPlugin($locksPlugin);
30 $response1 =
new HTTP\ResponseMock();
33 $server->httpResponse = $response1;
34 $server->sapi =
new HTTP\SapiMock();
37 $this->assertEquals(201,
$server->httpResponse->getStatus(),
'Full response body:' . $response1->getBodyAsString());
38 $this->assertTrue(!!
$server->httpResponse->getHeaders(
'Lock-Token'));
39 $lockToken =
$server->httpResponse->getHeader(
'Lock-Token');
43 $response2 =
new HTTP\ResponseMock();
46 $server->httpResponse = $response2;
49 $this->assertEquals(201,
$server->httpResponse->status);
50 $this->assertTrue(!!
$server->httpResponse->getHeaders(
'Lock-Token'));
54 $response3 =
new HTTP\ResponseMock();
56 $server->httpResponse = $response3;
59 $this->assertEquals(204,
$server->httpResponse->status);
getPutRequest($lockToken)
The documentation for this class was generated from the following file: