Definition at line 7 of file ServerMKCOLTest.php.
◆ testMkcol()
Sabre\DAV\ServerMKCOLTest::testMkcol |
( |
| ) |
|
Definition at line 9 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
12 'REQUEST_URI' =>
'/testcol',
13 'REQUEST_METHOD' =>
'MKCOL',
18 $this->server->httpRequest = (
$request);
19 $this->server->exec();
23 'Content-Length' => [
'0'],
24 ], $this->response->getHeaders());
26 $this->assertEquals(201, $this->response->status);
27 $this->assertEquals(
'', $this->response->body);
28 $this->assertTrue(is_dir($this->tempDir .
'/testcol'));
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLAlreadyExists()
Sabre\DAV\ServerMKCOLTest::testMKCOLAlreadyExists |
( |
| ) |
|
testMKCOLIncorrectResourceType
Definition at line 289 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
292 'REQUEST_URI' =>
'/test.txt',
293 'REQUEST_METHOD' =>
'MKCOL',
299 $this->server->httpRequest = (
$request);
300 $this->server->exec();
302 $this->assertEquals([
304 'Content-Type' => [
'application/xml; charset=utf-8'],
305 'Allow' => [
'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'],
306 ], $this->response->getHeaders());
308 $this->assertEquals(405, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLAndProps()
Sabre\DAV\ServerMKCOLTest::testMKCOLAndProps |
( |
| ) |
|
testMKCOLSuccess testMKCOLAlreadyExists
Definition at line 316 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, and Sabre\DAV\Version\VERSION.
321 [
'Content-Type' =>
'application/xml']
323 $request->setBody(
'<?xml version="1.0"?> 327 <resourcetype><collection /></resourcetype> 328 <displayname>my new collection</displayname> 332 $this->server->httpRequest = (
$request);
333 $this->server->exec();
335 $this->assertEquals(207, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
337 $this->assertEquals([
339 'Content-Type' => [
'application/xml; charset=utf-8'],
340 ], $this->response->getHeaders());
342 $responseBody = $this->response->getBodyAsString();
345 <?xml version=
"1.0"?>
346 <d:multistatus xmlns:d=
"DAV:" xmlns:
s=
"http://sabredav.org/ns">
348 <d:href>/testcol</d:href>
353 <d:status>
HTTP/1.1 403 Forbidden</d:status>
359 $this->assertXmlStringEqualsXmlString(
const VERSION
Full version number.
◆ testMKCOLBrokenXML()
Sabre\DAV\ServerMKCOLTest::testMKCOLBrokenXML |
( |
| ) |
|
testMkcol
Definition at line 59 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
62 'REQUEST_URI' =>
'/testcol',
63 'REQUEST_METHOD' =>
'MKCOL',
64 'HTTP_CONTENT_TYPE' =>
'application/xml',
69 $this->server->httpRequest = (
$request);
70 $this->server->exec();
74 'Content-Type' => [
'application/xml; charset=utf-8'],
75 ], $this->response->getHeaders());
77 $this->assertEquals(400, $this->response->getStatus(), $this->response->getBodyAsString());
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLIncorrectResourceType()
Sabre\DAV\ServerMKCOLTest::testMKCOLIncorrectResourceType |
( |
| ) |
|
testMkcol
Definition at line 141 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
144 'REQUEST_URI' =>
'/testcol',
145 'REQUEST_METHOD' =>
'MKCOL',
146 'HTTP_CONTENT_TYPE' =>
'application/xml',
150 $request->setBody(
'<?xml version="1.0"?> 154 <resourcetype><collection /><blabla /></resourcetype> 158 $this->server->httpRequest = (
$request);
159 $this->server->exec();
161 $this->assertEquals([
163 'Content-Type' => [
'application/xml; charset=utf-8'],
164 ], $this->response->getHeaders());
166 $this->assertEquals(403, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLNoParent()
Sabre\DAV\ServerMKCOLTest::testMKCOLNoParent |
( |
| ) |
|
testMKCOLIncorrectResourceType
Definition at line 239 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
242 'REQUEST_URI' =>
'/testnoparent/409me',
243 'REQUEST_METHOD' =>
'MKCOL',
249 $this->server->httpRequest = (
$request);
250 $this->server->exec();
252 $this->assertEquals([
254 'Content-Type' => [
'application/xml; charset=utf-8'],
255 ], $this->response->getHeaders());
257 $this->assertEquals(409, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLNoResourceType()
Sabre\DAV\ServerMKCOLTest::testMKCOLNoResourceType |
( |
| ) |
|
testMkcol
Definition at line 109 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
112 'REQUEST_URI' =>
'/testcol',
113 'REQUEST_METHOD' =>
'MKCOL',
114 'HTTP_CONTENT_TYPE' =>
'application/xml',
118 $request->setBody(
'<?xml version="1.0"?> 122 <displayname>Evert</displayname> 126 $this->server->httpRequest = (
$request);
127 $this->server->exec();
129 $this->assertEquals([
131 'Content-Type' => [
'application/xml; charset=utf-8'],
132 ], $this->response->getHeaders());
134 $this->assertEquals(400, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLParentIsNoCollection()
Sabre\DAV\ServerMKCOLTest::testMKCOLParentIsNoCollection |
( |
| ) |
|
testMKCOLIncorrectResourceType
Definition at line 264 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
267 'REQUEST_URI' =>
'/test.txt/409me',
268 'REQUEST_METHOD' =>
'MKCOL',
274 $this->server->httpRequest = (
$request);
275 $this->server->exec();
277 $this->assertEquals([
279 'Content-Type' => [
'application/xml; charset=utf-8'],
280 ], $this->response->getHeaders());
282 $this->assertEquals(409, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLSuccess()
Sabre\DAV\ServerMKCOLTest::testMKCOLSuccess |
( |
| ) |
|
testMKCOLIncorrectResourceType
Definition at line 173 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
176 'REQUEST_URI' =>
'/testcol',
177 'REQUEST_METHOD' =>
'MKCOL',
178 'HTTP_CONTENT_TYPE' =>
'application/xml',
182 $request->setBody(
'<?xml version="1.0"?> 186 <resourcetype><collection /></resourcetype> 190 $this->server->httpRequest = (
$request);
191 $this->server->exec();
193 $this->assertEquals([
195 'Content-Length' => [
'0'],
196 ], $this->response->getHeaders());
198 $this->assertEquals(201, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLUnknownBody()
Sabre\DAV\ServerMKCOLTest::testMKCOLUnknownBody |
( |
| ) |
|
◆ testMKCOLUnknownXML()
Sabre\DAV\ServerMKCOLTest::testMKCOLUnknownXML |
( |
| ) |
|
testMkcol
Definition at line 84 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
87 'REQUEST_URI' =>
'/testcol',
88 'REQUEST_METHOD' =>
'MKCOL',
89 'HTTP_CONTENT_TYPE' =>
'application/xml',
93 $request->setBody(
'<?xml version="1.0"?><html></html>');
94 $this->server->httpRequest = (
$request);
95 $this->server->exec();
99 'Content-Type' => [
'application/xml; charset=utf-8'],
100 ], $this->response->getHeaders());
102 $this->assertEquals(400, $this->response->getStatus());
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
◆ testMKCOLWhiteSpaceResourceType()
Sabre\DAV\ServerMKCOLTest::testMKCOLWhiteSpaceResourceType |
( |
| ) |
|
testMKCOLIncorrectResourceType
Definition at line 205 of file ServerMKCOLTest.php.
References Sabre\DAV\AbstractServer\$request, Sabre\HTTP\Sapi\createFromServerArray(), and Sabre\DAV\Version\VERSION.
208 'REQUEST_URI' =>
'/testcol',
209 'REQUEST_METHOD' =>
'MKCOL',
210 'HTTP_CONTENT_TYPE' =>
'application/xml',
214 $request->setBody(
'<?xml version="1.0"?> 224 $this->server->httpRequest = (
$request);
225 $this->server->exec();
227 $this->assertEquals([
229 'Content-Length' => [
'0'],
230 ], $this->response->getHeaders());
232 $this->assertEquals(201, $this->response->status,
'Wrong statuscode received. Full response body: ' . $this->response->body);
const VERSION
Full version number.
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
The documentation for this class was generated from the following file: