1*a1a3b679SAndreas Boehler<?php 2*a1a3b679SAndreas Boehler 3*a1a3b679SAndreas Boehlernamespace Sabre\DAV\Browser; 4*a1a3b679SAndreas Boehler 5*a1a3b679SAndreas Boehleruse Sabre\DAV; 6*a1a3b679SAndreas Boehleruse Sabre\HTTP; 7*a1a3b679SAndreas Boehler 8*a1a3b679SAndreas Boehlerrequire_once 'Sabre/DAV/AbstractServer.php'; 9*a1a3b679SAndreas Boehler 10*a1a3b679SAndreas Boehlerclass MapGetToPropFindTest extends DAV\AbstractServer { 11*a1a3b679SAndreas Boehler 12*a1a3b679SAndreas Boehler function setUp() { 13*a1a3b679SAndreas Boehler 14*a1a3b679SAndreas Boehler parent::setUp(); 15*a1a3b679SAndreas Boehler $this->server->addPlugin(new MapGetToPropFind()); 16*a1a3b679SAndreas Boehler 17*a1a3b679SAndreas Boehler } 18*a1a3b679SAndreas Boehler 19*a1a3b679SAndreas Boehler function testCollectionGet() { 20*a1a3b679SAndreas Boehler 21*a1a3b679SAndreas Boehler $serverVars = array( 22*a1a3b679SAndreas Boehler 'REQUEST_URI' => '/', 23*a1a3b679SAndreas Boehler 'REQUEST_METHOD' => 'GET', 24*a1a3b679SAndreas Boehler ); 25*a1a3b679SAndreas Boehler 26*a1a3b679SAndreas Boehler $request = HTTP\Sapi::createFromServerArray($serverVars); 27*a1a3b679SAndreas Boehler $request->setBody(''); 28*a1a3b679SAndreas Boehler $this->server->httpRequest = ($request); 29*a1a3b679SAndreas Boehler $this->server->exec(); 30*a1a3b679SAndreas Boehler 31*a1a3b679SAndreas Boehler $this->assertEquals(207, $this->response->status,'Incorrect status response received. Full response body: ' . $this->response->body); 32*a1a3b679SAndreas Boehler $this->assertEquals(array( 33*a1a3b679SAndreas Boehler 'X-Sabre-Version' => [DAV\Version::VERSION], 34*a1a3b679SAndreas Boehler 'Content-Type' => ['application/xml; charset=utf-8'], 35*a1a3b679SAndreas Boehler 'DAV' => ['1, 3, extended-mkcol'], 36*a1a3b679SAndreas Boehler 'Vary' => ['Brief,Prefer'], 37*a1a3b679SAndreas Boehler ), 38*a1a3b679SAndreas Boehler $this->response->getHeaders() 39*a1a3b679SAndreas Boehler ); 40*a1a3b679SAndreas Boehler 41*a1a3b679SAndreas Boehler } 42*a1a3b679SAndreas Boehler 43*a1a3b679SAndreas Boehler 44*a1a3b679SAndreas Boehler} 45