1<?php 2 3namespace Sabre\DAV\Browser; 4 5use Sabre\DAV; 6use Sabre\HTTP; 7 8require_once 'Sabre/DAV/AbstractServer.php'; 9 10class 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 = array( 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(array( 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} 45