]> git.mxchange.org Git - friendica-addons.git/blob - dav/SabreDAV/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php
Merge branch 'master' of git://github.com/friendica/friendica-addons
[friendica-addons.git] / dav / SabreDAV / tests / Sabre / DAV / Browser / MapGetToPropFindTest.php
1 <?php
2
3 require_once 'Sabre/DAV/AbstractServer.php';
4
5 class Sabre_DAV_Browser_MapGetToPropFindTest extends Sabre_DAV_AbstractServer {
6
7     function setUp() {
8
9         parent::setUp();
10         $this->server->addPlugin(new Sabre_DAV_Browser_MapGetToPropFind());
11
12     }
13
14     function testCollectionGet() {
15
16         $serverVars = array(
17             'REQUEST_URI'    => '/',
18             'REQUEST_METHOD' => 'GET',
19         );
20
21         $request = new Sabre_HTTP_Request($serverVars);
22         $request->setBody('');
23         $this->server->httpRequest = ($request);
24         $this->server->exec();
25
26         $this->assertEquals(array(
27             'Content-Type' => 'application/xml; charset=utf-8',
28             'DAV' => '1, 3, extended-mkcol',
29             ),
30             $this->response->headers
31          );
32
33         $this->assertEquals('HTTP/1.1 207 Multi-Status',$this->response->status,'Incorrect status response received. Full response body: ' . $this->response->body);
34
35     }
36
37
38 }