ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
MapGetToPropFindTest.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
Sabre\DAV\Browser
;
4
5
use
Sabre\DAV
;
6
use
Sabre\HTTP
;
7
8
require_once
'Sabre/DAV/AbstractServer.php'
;
9
10
class
MapGetToPropFindTest
extends
DAV\AbstractServer
{
11
12
function
setUp
() {
13
14
parent::setUp();
15
$this->server->addPlugin(
new
MapGetToPropFind
());
16
17
}
18
19
function
testCollectionGet
() {
20
21
$serverVars = [
22
'REQUEST_URI'
=>
'/'
,
23
'REQUEST_METHOD'
=>
'GET'
,
24
];
25
26
$request
=
HTTP\Sapi::createFromServerArray
($serverVars);
27
$request
->setBody(
''
);
28
$this->server->httpRequest = (
$request
);
29
$this->server->exec();
30
31
$this->assertEquals(207, $this->response->status,
'Incorrect status response received. Full response body: '
. $this->response->body);
32
$this->assertEquals([
33
'X-Sabre-Version'
=> [DAV\
Version::VERSION
],
34
'Content-Type'
=> [
'application/xml; charset=utf-8'
],
35
'DAV'
=> [
'1, 3, extended-mkcol'
],
36
'Vary'
=> [
'Brief,Prefer'
],
37
],
38
$this->response->getHeaders()
39
);
40
41
}
42
43
44
}
Sabre\DAV
Sabre\DAV\Browser
Definition:
GuessContentType.php:3
Sabre\DAV\Browser\MapGetToPropFind
This is a simple plugin that will map any GET request for non-files to PROPFIND allprops-requests.
Definition:
MapGetToPropFind.php:19
Sabre\DAV\Browser\MapGetToPropFindTest
Definition:
MapGetToPropFindTest.php:10
Sabre\HTTP
Definition:
ResponseMock.php:3
Sabre\DAV\Version\VERSION
const VERSION
Full version number.
Definition:
Version.php:17
Sabre\DAV\AbstractServer\$request
$request
Definition:
AbstractServer.php:13
Sabre\DAV\Browser\MapGetToPropFindTest\testCollectionGet
testCollectionGet()
Definition:
MapGetToPropFindTest.php:19
Sabre\DAV\AbstractServer
Definition:
AbstractServer.php:7
php
Sabre\HTTP\Sapi\createFromServerArray
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition:
Sapi.php:107
Sabre\DAV\Browser\MapGetToPropFindTest\setUp
setUp()
Definition:
MapGetToPropFindTest.php:12
libs
composer
vendor
sabre
dav
tests
Sabre
DAV
Browser
MapGetToPropFindTest.php
Generated on Thu Jan 16 2025 19:01:52 for ILIAS by
1.8.13 (using
Doxyfile
)