ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
MapGetToPropFindTest.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\DAV\Browser;
4
5use Sabre\DAV;
6use Sabre\HTTP;
7
8require_once 'Sabre/DAV/AbstractServer.php';
9
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
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}
An exception for terminatinating execution or to throw for unit testing.
This is a simple plugin that will map any GET request for non-files to PROPFIND allprops-requests.
const VERSION
Full version number.
Definition: Version.php:17
static createFromServerArray(array $serverArray)
This static method will create a new Request object, based on a PHP $_SERVER array.
Definition: Sapi.php:107