コード例 #1
0
ファイル: HttpGetTest.php プロジェクト: jakobsack/sabre-dav
 function testGetHttp10()
 {
     $request = new HTTP\Request('GET', '/file1');
     $request->setHttpVersion('1.0');
     $response = $this->request($request);
     $this->assertEquals(200, $response->getStatus());
     // Removing Last-Modified because it keeps changing.
     $response->removeHeader('Last-Modified');
     $this->assertEquals(['X-Sabre-Version' => [Version::VERSION], 'Content-Type' => ['application/octet-stream'], 'Content-Length' => [3], 'ETag' => ['"' . md5('foo') . '"']], $response->getHeaders());
     $this->assertEquals('1.0', $response->getHttpVersion());
     $this->assertEquals('foo', $response->getBodyAsString());
 }