[Pkg-owncloud-commits] [php-sabredav] 261/275: Upgraded to sabre/http 3.0
David Prévot
taffit at moszumanska.debian.org
Thu Sep 25 14:56:16 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit d85701dc69bbfbb5a2d9408f2e9c3eb31bf140b8
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Tue Sep 23 22:35:33 2014 +0100
Upgraded to sabre/http 3.0
---
composer.json | 2 +-
tests/Sabre/CalDAV/ICSExportPluginTest.php | 8 +--
tests/Sabre/CalDAV/PluginTest.php | 4 +-
.../Sabre/CalDAV/Schedule/FreeBusyRequestTest.php | 2 +-
tests/Sabre/CalDAV/ValidateICalTest.php | 6 +-
tests/Sabre/DAV/Browser/MapGetToPropFindTest.php | 8 +--
tests/Sabre/DAV/Browser/PluginTest.php | 24 +++----
tests/Sabre/DAV/ClientTest.php | 10 +--
tests/Sabre/DAV/FSExt/ServerTest.php | 62 ++++++++--------
tests/Sabre/DAV/HttpDeleteTest.php | 8 +--
tests/Sabre/DAV/HttpPutTest.php | 38 +++++-----
tests/Sabre/DAV/Locks/PluginTest.php | 20 +++---
tests/Sabre/DAV/ServerCopyMoveTest.php | 28 ++++----
tests/Sabre/DAV/ServerMKCOLTest.php | 54 +++++++-------
tests/Sabre/DAV/ServerPluginTest.php | 12 ++--
tests/Sabre/DAV/ServerPreconditionTest.php | 8 +--
tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php | 8 +--
tests/Sabre/DAV/ServerPropsTest.php | 22 +++---
tests/Sabre/DAV/ServerRangeTest.php | 80 ++++++++++-----------
tests/Sabre/DAV/ServerSimpleTest.php | 82 +++++++++++-----------
tests/Sabre/DAV/TemporaryFileFilterTest.php | 26 +++----
tests/Sabre/DAVACL/ExpandPropertiesTest.php | 16 ++---
tests/Sabre/DAVACL/PrincipalPropertySearchTest.php | 34 ++++-----
.../DAVACL/PrincipalSearchPropertySetTest.php | 12 ++--
24 files changed, 287 insertions(+), 287 deletions(-)
diff --git a/composer.json b/composer.json
index ec16845..ba56d58 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
"php": ">=5.4.1",
"sabre/vobject": "~3.3.2",
"sabre/event" : "~2.0.0",
- "sabre/http" : "2.1.0-alpha1",
+ "sabre/http" : "~3.0.0",
"ext-dom": "*",
"ext-pcre": "*",
"ext-spl": "*",
diff --git a/tests/Sabre/CalDAV/ICSExportPluginTest.php b/tests/Sabre/CalDAV/ICSExportPluginTest.php
index fa0d9e3..344e582 100644
--- a/tests/Sabre/CalDAV/ICSExportPluginTest.php
+++ b/tests/Sabre/CalDAV/ICSExportPluginTest.php
@@ -60,7 +60,7 @@ class ICSExportPluginTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(200, $s->httpResponse->status);
$this->assertEquals([
- 'Content-Type' => 'text/calendar',
+ 'Content-Type' => ['text/calendar'],
], $s->httpResponse->getHeaders());
$obj = VObject\Reader::read($s->httpResponse->body);
@@ -111,7 +111,7 @@ class ICSExportPluginTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(200, $s->httpResponse->status);
$this->assertEquals([
- 'Content-Type' => 'text/calendar',
+ 'Content-Type' => ['text/calendar'],
], $s->httpResponse->getHeaders());
$obj = VObject\Reader::read($s->httpResponse->body);
@@ -217,8 +217,8 @@ class ICSExportPluginTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(200, $s->httpResponse->status,'Invalid status received. Response body: '. $s->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'text/calendar',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['text/calendar'],
), $s->httpResponse->getHeaders());
$obj = VObject\Reader::read($s->httpResponse->body);
diff --git a/tests/Sabre/CalDAV/PluginTest.php b/tests/Sabre/CalDAV/PluginTest.php
index c8f723e..b518f4f 100644
--- a/tests/Sabre/CalDAV/PluginTest.php
+++ b/tests/Sabre/CalDAV/PluginTest.php
@@ -1102,8 +1102,8 @@ END:VCALENDAR';
$this->assertEquals(200, $httpResponse->status);
$this->assertEquals(array(
- 'Content-Type' => 'application/xml',
- 'ETag' => '"1"',
+ 'Content-Type' => ['application/xml'],
+ 'ETag' => ['"1"'],
), $httpResponse->getHeaders());
$expected =
diff --git a/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php b/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php
index 94dd934..eda0b8f 100644
--- a/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php
+++ b/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php
@@ -288,7 +288,7 @@ ICS;
$this->assertEquals(200, $this->response->status);
$this->assertEquals(array(
- 'Content-Type' => 'application/xml',
+ 'Content-Type' => ['application/xml'],
), $this->response->getHeaders());
$strings = array(
diff --git a/tests/Sabre/CalDAV/ValidateICalTest.php b/tests/Sabre/CalDAV/ValidateICalTest.php
index ebbc894..4cebba0 100644
--- a/tests/Sabre/CalDAV/ValidateICalTest.php
+++ b/tests/Sabre/CalDAV/ValidateICalTest.php
@@ -89,9 +89,9 @@ class ValidateICalTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(201, $response->status, 'Incorrect status returned! Full response body: ' . $response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5("BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n") . '"',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5("BEGIN:VCALENDAR\r\nBEGIN:VEVENT\r\nUID:foo\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n") . '"'],
), $response->getHeaders());
$expected = array(
diff --git a/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php b/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php
index c94f6fd..9d9fbb3 100644
--- a/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php
+++ b/tests/Sabre/DAV/Browser/MapGetToPropFindTest.php
@@ -30,10 +30,10 @@ class MapGetToPropFindTest extends DAV\AbstractServer {
$this->assertEquals(207, $this->response->status,'Incorrect status response received. Full response body: ' . $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'DAV' => '1, 3, extended-mkcol',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'DAV' => ['1, 3, extended-mkcol'],
+ 'Vary' => ['Brief,Prefer'],
),
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/Browser/PluginTest.php b/tests/Sabre/DAV/Browser/PluginTest.php
index f6192cd..b1ea646 100644
--- a/tests/Sabre/DAV/Browser/PluginTest.php
+++ b/tests/Sabre/DAV/Browser/PluginTest.php
@@ -28,9 +28,9 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->getStatus(), "Incorrect status received. Full response body: " . $this->response->getBodyAsString());
$this->assertEquals(
[
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'text/html; charset=utf-8',
- 'Content-Security-Policy' => "img-src 'self'; style-src 'self';"
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['text/html; charset=utf-8'],
+ 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
],
$this->response->getHeaders()
);
@@ -48,9 +48,9 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->status, "Incorrect status received. Full response body: " . $this->response->getBodyAsString());
$this->assertEquals(
[
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'text/html; charset=utf-8',
- 'Content-Security-Policy' => "img-src 'self'; style-src 'self';"
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['text/html; charset=utf-8'],
+ 'Content-Security-Policy' => ["img-src 'self'; style-src 'self';"]
],
$this->response->getHeaders()
);
@@ -111,8 +111,8 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(302, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Location' => '/',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Location' => ['/'],
), $this->response->getHeaders());
$this->assertTrue(is_dir(SABRE_TEMPDIR . '/new_collection'));
@@ -127,10 +127,10 @@ class PluginTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->getStatus(), 'Error: ' . $this->response->body);
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'image/vnd.microsoft.icon',
- 'Content-Length' => '4286',
- 'Cache-Control' => 'public, max-age=1209600',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['image/vnd.microsoft.icon'],
+ 'Content-Length' => ['4286'],
+ 'Cache-Control' => ['public, max-age=1209600'],
], $this->response->getHeaders());
}
diff --git a/tests/Sabre/DAV/ClientTest.php b/tests/Sabre/DAV/ClientTest.php
index b9556a2..6ca88b3 100644
--- a/tests/Sabre/DAV/ClientTest.php
+++ b/tests/Sabre/DAV/ClientTest.php
@@ -143,8 +143,8 @@ XML;
$this->assertEquals('PROPFIND', $request->getMethod());
$this->assertEquals('/foo', $request->getUrl());
$this->assertEquals([
- 'Depth' => '0',
- 'Content-Type' => 'application/xml',
+ 'Depth' => ['0'],
+ 'Content-Type' => ['application/xml'],
], $request->getHeaders());
}
@@ -197,8 +197,8 @@ XML;
$this->assertEquals('PROPFIND', $request->getMethod());
$this->assertEquals('/foo', $request->getUrl());
$this->assertEquals([
- 'Depth' => '1',
- 'Content-Type' => 'application/xml',
+ 'Depth' => ['1'],
+ 'Content-Type' => ['application/xml'],
], $request->getHeaders());
}
@@ -230,7 +230,7 @@ XML;
$this->assertEquals('PROPPATCH', $request->getMethod());
$this->assertEquals('/foo', $request->getUrl());
$this->assertEquals([
- 'Content-Type' => 'application/xml',
+ 'Content-Type' => ['application/xml'],
], $request->getHeaders());
}
diff --git a/tests/Sabre/DAV/FSExt/ServerTest.php b/tests/Sabre/DAV/FSExt/ServerTest.php
index 26759b4..18ada07 100644
--- a/tests/Sabre/DAV/FSExt/ServerTest.php
+++ b/tests/Sabre/DAV/FSExt/ServerTest.php
@@ -23,11 +23,11 @@ class ServerTest extends DAV\AbstractServer{
$this->assertEquals(200, $this->response->getStatus(), 'Invalid status code received.');
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' .md5_file($this->tempDir . '/test.txt') . '"',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' .md5_file($this->tempDir . '/test.txt') . '"'],
],
$this->response->getHeaders()
);
@@ -44,11 +44,11 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5_file($this->tempDir . '/test.txt') . '"',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5_file($this->tempDir . '/test.txt') . '"'],
],
$this->response->getHeaders()
);
@@ -66,9 +66,9 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => 0,
- 'ETag' => '"' . md5('Testing new file') . '"',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => [0],
+ 'ETag' => ['"' . md5('Testing new file') . '"'],
], $this->response->getHeaders());
$this->assertEquals(201, $this->response->status);
@@ -85,8 +85,8 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
],$this->response->getHeaders());
$this->assertEquals(412, $this->response->status);
@@ -101,8 +101,8 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => ['0'],
],$this->response->getHeaders());
$this->assertEquals(201, $this->response->status);
@@ -133,8 +133,8 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => ['0'],
],$this->response->getHeaders());
$this->assertEquals(204, $this->response->status);
@@ -153,8 +153,8 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => ['0'],
],$this->response->getHeaders());
$this->assertEquals(204, $this->response->status);
$this->assertEquals('', $this->response->body);
@@ -169,12 +169,12 @@ class ServerTest extends DAV\AbstractServer{
$this->server->exec();
$this->assertEquals([
- 'DAV' => '1, 3, extended-mkcol',
- 'MS-Author-Via' => 'DAV',
- 'Allow' => 'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT',
- 'Accept-Ranges' => 'bytes',
- 'Content-Length' => '0',
- 'X-Sabre-Version'=> DAV\Version::VERSION,
+ 'DAV' => ['1, 3, extended-mkcol'],
+ 'MS-Author-Via' => ['DAV'],
+ 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'],
+ 'Accept-Ranges' => ['bytes'],
+ 'Content-Length' => ['0'],
+ 'X-Sabre-Version'=> [DAV\Version::VERSION],
], $this->response->getHeaders());
$this->assertEquals(200, $this->response->status);
@@ -194,8 +194,8 @@ class ServerTest extends DAV\AbstractServer{
$this->assertEquals('', $this->response->body);
$this->assertEquals([
- 'Content-Length' => '0',
- 'X-Sabre-Version'=> DAV\Version::VERSION,
+ 'Content-Length' => ['0'],
+ 'X-Sabre-Version'=> [DAV\Version::VERSION],
],$this->response->getHeaders());
$this->assertTrue(
@@ -232,8 +232,8 @@ class ServerTest extends DAV\AbstractServer{
$this->assertEquals('', $this->response->body);
$this->assertEquals([
- 'Content-Length' => '0',
- 'X-Sabre-Version'=> DAV\Version::VERSION,
+ 'Content-Length' => ['0'],
+ 'X-Sabre-Version'=> [DAV\Version::VERSION],
],$this->response->getHeaders());
$this->assertTrue(
diff --git a/tests/Sabre/DAV/HttpDeleteTest.php b/tests/Sabre/DAV/HttpDeleteTest.php
index 9a53831..ad43fbb 100644
--- a/tests/Sabre/DAV/HttpDeleteTest.php
+++ b/tests/Sabre/DAV/HttpDeleteTest.php
@@ -48,8 +48,8 @@ class HttpDeleteTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
],
$response->getHeaders()
);
@@ -73,8 +73,8 @@ class HttpDeleteTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
],
$response->getHeaders()
);
diff --git a/tests/Sabre/DAV/HttpPutTest.php b/tests/Sabre/DAV/HttpPutTest.php
index a9befe1..48293c8 100644
--- a/tests/Sabre/DAV/HttpPutTest.php
+++ b/tests/Sabre/DAV/HttpPutTest.php
@@ -45,9 +45,9 @@ class HttpPutTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5('hello') . '"'
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5('hello') . '"']
],
$response->getHeaders()
);
@@ -74,9 +74,9 @@ class HttpPutTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5('bar') . '"'
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5('bar') . '"']
],
$response->getHeaders()
);
@@ -108,9 +108,9 @@ class HttpPutTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5('hello') . '"'
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5('hello') . '"']
],
$response->getHeaders()
);
@@ -142,9 +142,9 @@ class HttpPutTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5('hello') . '"'
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5('hello') . '"'],
],
$response->getHeaders()
);
@@ -195,9 +195,9 @@ class HttpPutTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5('hello') . '"'
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5('hello') . '"']
],
$response->getHeaders()
);
@@ -290,9 +290,9 @@ class HttpPutTest extends DAVServerTest {
$this->assertEquals(
[
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
- 'ETag' => '"' . md5('hello') . '"'
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
+ 'ETag' => ['"' . md5('hello') . '"'],
],
$response->getHeaders()
);
@@ -341,7 +341,7 @@ class HttpPutTest extends DAVServerTest {
);
$this->assertEquals([
- 'X-Sabre-Version' => Version::VERSION,
+ 'X-Sabre-Version' => [Version::VERSION],
], $response->getHeaders());
}
diff --git a/tests/Sabre/DAV/Locks/PluginTest.php b/tests/Sabre/DAV/Locks/PluginTest.php
index aa38af2..5bd3cf7 100644
--- a/tests/Sabre/DAV/Locks/PluginTest.php
+++ b/tests/Sabre/DAV/Locks/PluginTest.php
@@ -57,8 +57,8 @@ class PluginTest extends DAV\AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),
$this->response->getHeaders()
);
@@ -240,8 +240,8 @@ class PluginTest extends DAV\AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),
$this->response->getHeaders()
);
@@ -266,8 +266,8 @@ class PluginTest extends DAV\AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),
$this->response->getHeaders()
);
@@ -357,8 +357,8 @@ class PluginTest extends DAV\AbstractServer {
$this->assertEquals(204,$this->server->httpResponse->status,'Got an incorrect status code. Full response body: ' . $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => ['0'],
),
$this->server->httpResponse->getHeaders()
);
@@ -405,8 +405,8 @@ class PluginTest extends DAV\AbstractServer {
$this->assertEquals(204, $this->server->httpResponse->status,'Got an incorrect status code. Full response body: ' . $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Length' => ['0'],
),
$this->server->httpResponse->getHeaders()
);
diff --git a/tests/Sabre/DAV/ServerCopyMoveTest.php b/tests/Sabre/DAV/ServerCopyMoveTest.php
index 7e72857..4fe0795 100644
--- a/tests/Sabre/DAV/ServerCopyMoveTest.php
+++ b/tests/Sabre/DAV/ServerCopyMoveTest.php
@@ -63,8 +63,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(204, $this->response->status, 'Received an incorrect HTTP status. Full body inspection: ' . $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),
$this->response->getHeaders()
);
@@ -120,8 +120,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => 0,
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => [0],
),
$this->response->getHeaders()
);
@@ -146,8 +146,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),
$this->response->getHeaders()
);
@@ -172,8 +172,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),
$this->response->getHeaders()
);
@@ -214,8 +214,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(201, $this->response->status, 'Full response: ' . $this->response->getBody(true));
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),
$this->response->getHeaders()
);
@@ -237,8 +237,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),
$this->response->getHeaders()
);
@@ -263,8 +263,8 @@ class ServerCopyMoveTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(201, $this->response->status, 'Incorrect status received. Full response body: ' . $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/ServerMKCOLTest.php b/tests/Sabre/DAV/ServerMKCOLTest.php
index 8443e16..5c04d6f 100644
--- a/tests/Sabre/DAV/ServerMKCOLTest.php
+++ b/tests/Sabre/DAV/ServerMKCOLTest.php
@@ -19,8 +19,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),$this->response->getHeaders());
$this->assertEquals(201, $this->response->status);
@@ -45,8 +45,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(415, $this->response->status);
@@ -70,8 +70,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(400, $this->response->status);
@@ -95,8 +95,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(415, $this->response->status);
@@ -127,8 +127,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(400, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -159,8 +159,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(403, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -191,8 +191,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(403, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -223,8 +223,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),$this->response->getHeaders());
$this->assertEquals(201, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -257,8 +257,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Length' => '0',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Length' => ['0'],
),$this->response->getHeaders());
$this->assertEquals(201, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -282,8 +282,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(409, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -307,8 +307,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(409, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -332,9 +332,9 @@ class ServerMKCOLTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Allow' => 'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'],
),$this->response->getHeaders());
$this->assertEquals(405, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
@@ -369,8 +369,8 @@ class ServerMKCOLTest extends AbstractServer {
$this->assertEquals(207, $this->response->status, 'Wrong statuscode received. Full response body: ' .$this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
}
diff --git a/tests/Sabre/DAV/ServerPluginTest.php b/tests/Sabre/DAV/ServerPluginTest.php
index c009c92..c7a92cd 100644
--- a/tests/Sabre/DAV/ServerPluginTest.php
+++ b/tests/Sabre/DAV/ServerPluginTest.php
@@ -45,12 +45,12 @@ class ServerPluginTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'DAV' => '1, 3, extended-mkcol, drinking',
- 'MS-Author-Via' => 'DAV',
- 'Allow' => 'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE',
- 'Accept-Ranges' => 'bytes',
- 'Content-Length' => '0',
- 'X-Sabre-Version' => Version::VERSION,
+ 'DAV' => ['1, 3, extended-mkcol, drinking'],
+ 'MS-Author-Via' => ['DAV'],
+ 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, BEER, WINE'],
+ 'Accept-Ranges' => ['bytes'],
+ 'Content-Length' => ['0'],
+ 'X-Sabre-Version' => [Version::VERSION],
),$this->response->getHeaders());
$this->assertEquals(200, $this->response->status);
diff --git a/tests/Sabre/DAV/ServerPreconditionTest.php b/tests/Sabre/DAV/ServerPreconditionTest.php
index df27ef0..170deb7 100644
--- a/tests/Sabre/DAV/ServerPreconditionTest.php
+++ b/tests/Sabre/DAV/ServerPreconditionTest.php
@@ -171,7 +171,7 @@ class ServerPreconditionsTest extends \PHPUnit_Framework_TestCase {
$this->assertFalse($server->checkPreconditions($httpRequest, $server->httpResponse));
$this->assertEquals(304, $server->httpResponse->getStatus());
- $this->assertEquals(['ETag' => '"abc123"'], $server->httpResponse->getHeaders());
+ $this->assertEquals(['ETag' => ['"abc123"']], $server->httpResponse->getHeaders());
}
@@ -193,8 +193,8 @@ class ServerPreconditionsTest extends \PHPUnit_Framework_TestCase {
$this->assertFalse($server->checkPreconditions($httpRequest, $server->httpResponse));
$this->assertEquals(304, $server->httpResponse->getStatus());
$this->assertEquals([
- 'ETag' => '"abc123"',
- 'X-Sabre-Version' => Version::VERSION,
+ 'ETag' => ['"abc123"'],
+ 'X-Sabre-Version' => [Version::VERSION],
], $server->httpResponse->getHeaders());
$this->assertEquals(1, HTTP\SapiMock::$sent);
@@ -215,7 +215,7 @@ class ServerPreconditionsTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(304, $server->httpResponse->status);
$this->assertEquals(array(
- 'Last-Modified' => 'Sat, 06 Apr 1985 23:30:00 GMT',
+ 'Last-Modified' => ['Sat, 06 Apr 1985 23:30:00 GMT'],
), $server->httpResponse->getHeaders());
}
diff --git a/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php b/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php
index c7eaf16..bc821b3 100644
--- a/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php
+++ b/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php
@@ -54,10 +54,10 @@ class ServerPropsInfiniteDepthTest extends AbstractServer {
$this->assertEquals(207, $this->response->status, 'Incorrect status received. Full response body: ' . $this->response->getBodyAsString());
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'DAV' => '1, 3, extended-mkcol, 2',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'DAV' => ['1, 3, extended-mkcol, 2'],
+ 'Vary' => ['Brief,Prefer'],
),
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/ServerPropsTest.php b/tests/Sabre/DAV/ServerPropsTest.php
index 97bf624..f625c9e 100644
--- a/tests/Sabre/DAV/ServerPropsTest.php
+++ b/tests/Sabre/DAV/ServerPropsTest.php
@@ -47,10 +47,10 @@ class ServerPropsTest extends AbstractServer {
$this->assertEquals(207, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'DAV' => '1, 3, extended-mkcol, 2',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'DAV' => ['1, 3, extended-mkcol, 2'],
+ 'Vary' => ['Brief,Prefer'],
),
$this->response->getHeaders()
);
@@ -73,10 +73,10 @@ class ServerPropsTest extends AbstractServer {
$this->assertEquals(207, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'DAV' => '1, 3, extended-mkcol, 2',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'DAV' => ['1, 3, extended-mkcol, 2'],
+ 'Vary' => ['Brief,Prefer'],
),
$this->response->getHeaders()
);
@@ -313,9 +313,9 @@ class ServerPropsTest extends AbstractServer {
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Vary' => ['Brief,Prefer'],
),
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/ServerRangeTest.php b/tests/Sabre/DAV/ServerRangeTest.php
index ca2f30c..859f481 100644
--- a/tests/Sabre/DAV/ServerRangeTest.php
+++ b/tests/Sabre/DAV/ServerRangeTest.php
@@ -26,12 +26,12 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 4,
- 'Content-Range' => 'bytes 2-5/13',
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')). '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [4],
+ 'Content-Range' => ['bytes 2-5/13'],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')). '"'],
),
$this->response->getHeaders()
);
@@ -57,12 +57,12 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 11,
- 'Content-Range' => 'bytes 2-12/13',
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [11],
+ 'Content-Range' => ['bytes 2-12/13'],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -88,12 +88,12 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 8,
- 'Content-Range' => 'bytes 5-12/13',
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')). '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [8],
+ 'Content-Range' => ['bytes 5-12/13'],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')). '"'],
),
$this->response->getHeaders()
);
@@ -160,12 +160,12 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 4,
- 'Content-Range' => 'bytes 2-5/13',
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [4],
+ 'Content-Range' => ['bytes 2-5/13'],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -194,11 +194,11 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -227,12 +227,12 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 4,
- 'Content-Range' => 'bytes 2-5/13',
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [4],
+ 'Content-Range' => ['bytes 2-5/13'],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
@@ -261,11 +261,11 @@ class ServerRangeTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
- 'ETag' => '"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
+ 'ETag' => ['"' . md5(file_get_contents(SABRE_TEMPDIR . '/test.txt')) . '"'],
),
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/ServerSimpleTest.php b/tests/Sabre/DAV/ServerSimpleTest.php
index 205087a..2ca21c3 100644
--- a/tests/Sabre/DAV/ServerSimpleTest.php
+++ b/tests/Sabre/DAV/ServerSimpleTest.php
@@ -52,10 +52,10 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
),
$this->response->getHeaders()
);
@@ -77,10 +77,10 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
),
$this->response->getHeaders()
);
@@ -137,10 +137,10 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
),
$this->response->getHeaders()
);
@@ -163,10 +163,10 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
),
$this->response->getHeaders()
);
@@ -183,12 +183,12 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'DAV' => '1, 3, extended-mkcol',
- 'MS-Author-Via' => 'DAV',
- 'Allow' => 'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT',
- 'Accept-Ranges' => 'bytes',
- 'Content-Length' => '0',
- 'X-Sabre-Version' => Version::VERSION,
+ 'DAV' => ['1, 3, extended-mkcol'],
+ 'MS-Author-Via' => ['DAV'],
+ 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT'],
+ 'Accept-Ranges' => ['bytes'],
+ 'Content-Length' => ['0'],
+ 'X-Sabre-Version' => [Version::VERSION],
),$this->response->getHeaders());
$this->assertEquals(200, $this->response->status);
@@ -204,12 +204,12 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'DAV' => '1, 3, extended-mkcol',
- 'MS-Author-Via' => 'DAV',
- 'Allow' => 'OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, MKCOL',
- 'Accept-Ranges' => 'bytes',
- 'Content-Length' => '0',
- 'X-Sabre-Version' => Version::VERSION,
+ 'DAV' => ['1, 3, extended-mkcol'],
+ 'MS-Author-Via' => ['DAV'],
+ 'Allow' => ['OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT, MKCOL'],
+ 'Accept-Ranges' => ['bytes'],
+ 'Content-Length' => ['0'],
+ 'X-Sabre-Version' => [Version::VERSION],
),$this->response->getHeaders());
$this->assertEquals(200, $this->response->status);
@@ -229,8 +229,8 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(501, $this->response->status);
@@ -250,8 +250,8 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(501, $this->response->status);
@@ -282,10 +282,10 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/octet-stream',
- 'Content-Length' => 13,
- 'Last-Modified' => HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt'))),
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/octet-stream'],
+ 'Content-Length' => [13],
+ 'Last-Modified' => [HTTP\Util::toHTTPDate(new \DateTime('@' . filemtime($this->tempDir . '/test.txt')))],
),
$this->response->getHeaders()
);
@@ -543,7 +543,7 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$this->assertEquals(500, $this->response->status);
@@ -569,8 +569,8 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),
$this->response->getHeaders()
);
@@ -593,8 +593,8 @@ class ServerSimpleTest extends AbstractServer{
$this->server->exec();
$this->assertEquals(array(
- 'X-Sabre-Version' => Version::VERSION,
- 'testheader' => 'testvalue',
+ 'X-Sabre-Version' => [Version::VERSION],
+ 'testheader' => ['testvalue'],
),
$this->response->getHeaders()
);
diff --git a/tests/Sabre/DAV/TemporaryFileFilterTest.php b/tests/Sabre/DAV/TemporaryFileFilterTest.php
index bd71b4f..40d915a 100644
--- a/tests/Sabre/DAV/TemporaryFileFilterTest.php
+++ b/tests/Sabre/DAV/TemporaryFileFilterTest.php
@@ -50,7 +50,7 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals('', $this->response->body);
$this->assertEquals(201, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
+ 'X-Sabre-Temp' => ['true'],
),$this->response->getHeaders());
$this->assertFalse(file_exists(SABRE_TEMPDIR . '/._testput.txt'),'._testput.txt should not exist in the regular file structure.');
@@ -74,7 +74,7 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals('', $this->response->body);
$this->assertEquals(201, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
+ 'X-Sabre-Temp' => ['true'],
),$this->response->getHeaders());
$this->assertFalse(file_exists(SABRE_TEMPDIR . '/._testput.txt'),'._testput.txt should not exist in the regular file structure.');
@@ -84,8 +84,8 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals(412, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Temp' => ['true'],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
}
@@ -106,7 +106,7 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals('', $this->response->body);
$this->assertEquals(201, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
+ 'X-Sabre-Temp' => ['true'],
),$this->response->getHeaders());
$serverVars = array(
@@ -120,9 +120,9 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals(200, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
- 'Content-Length' => 16,
- 'Content-Type' => 'application/octet-stream',
+ 'X-Sabre-Temp' => ['true'],
+ 'Content-Length' => [16],
+ 'Content-Type' => ['application/octet-stream'],
),$this->response->getHeaders());
$this->assertEquals('Testing new file',stream_get_contents($this->response->body));
@@ -181,7 +181,7 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals('', $this->response->body);
$this->assertEquals(201, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
+ 'X-Sabre-Temp' => ['true'],
),$this->response->getHeaders());
$serverVars = array(
@@ -195,7 +195,7 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals(204, $this->response->status, "Incorrect status code received. Full body:\n". $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
+ 'X-Sabre-Temp' => ['true'],
),$this->response->getHeaders());
$this->assertEquals('',$this->response->body);
@@ -218,7 +218,7 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals('', $this->response->body);
$this->assertEquals(201, $this->response->status);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
+ 'X-Sabre-Temp' => ['true'],
),$this->response->getHeaders());
$serverVars = array(
@@ -233,8 +233,8 @@ class TemporaryFileFilterTest extends AbstractServer {
$this->assertEquals(207, $this->response->status,'Incorrect status code returned. Body: ' . $this->response->body);
$this->assertEquals(array(
- 'X-Sabre-Temp' => 'true',
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Temp' => ['true'],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
),$this->response->getHeaders());
$body = preg_replace("/xmlns(:[A-Za-z0-9_])?=(\"|\')DAV:(\"|\')/","xmlns\\1=\"urn:DAV\"",$this->response->body);
diff --git a/tests/Sabre/DAVACL/ExpandPropertiesTest.php b/tests/Sabre/DAVACL/ExpandPropertiesTest.php
index b0b9263..1955394 100644
--- a/tests/Sabre/DAVACL/ExpandPropertiesTest.php
+++ b/tests/Sabre/DAVACL/ExpandPropertiesTest.php
@@ -69,8 +69,8 @@ class ExpandPropertiesTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status,'Incorrect status code received. Full body: ' . $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
@@ -132,8 +132,8 @@ class ExpandPropertiesTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status, 'Incorrect response status received. Full response body: ' . $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
@@ -197,8 +197,8 @@ class ExpandPropertiesTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
@@ -265,8 +265,8 @@ class ExpandPropertiesTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
diff --git a/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php b/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
index d01ee56..5897051 100644
--- a/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
+++ b/tests/Sabre/DAVACL/PrincipalPropertySearchTest.php
@@ -64,8 +64,8 @@ class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(400, $server->httpResponse->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
}
@@ -103,9 +103,9 @@ class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Vary' => ['Brief,Prefer'],
), $server->httpResponse->getHeaders());
}
@@ -143,9 +143,9 @@ class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Vary' => ['Brief,Prefer'],
), $server->httpResponse->getHeaders());
@@ -216,9 +216,9 @@ class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Vary' => ['Brief,Prefer'],
), $server->httpResponse->getHeaders());
@@ -288,9 +288,9 @@ class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Vary' => ['Brief,Prefer'],
), $server->httpResponse->getHeaders());
@@ -353,9 +353,9 @@ class PrincipalPropertySearchTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(207, $server->httpResponse->status, $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
- 'Vary' => 'Brief,Prefer',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
+ 'Vary' => ['Brief,Prefer'],
), $server->httpResponse->getHeaders());
diff --git a/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php b/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php
index 3640ba7..12962fc 100644
--- a/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php
+++ b/tests/Sabre/DAVACL/PrincipalSearchPropertySetTest.php
@@ -50,8 +50,8 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(400, $server->httpResponse->status);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
}
@@ -77,8 +77,8 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(400, $server->httpResponse->status, $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
}
@@ -104,8 +104,8 @@ class PrincipalSearchPropertySetTest extends \PHPUnit_Framework_TestCase {
$this->assertEquals(200, $server->httpResponse->status, $server->httpResponse->body);
$this->assertEquals(array(
- 'X-Sabre-Version' => DAV\Version::VERSION,
- 'Content-Type' => 'application/xml; charset=utf-8',
+ 'X-Sabre-Version' => [DAV\Version::VERSION],
+ 'Content-Type' => ['application/xml; charset=utf-8'],
), $server->httpResponse->getHeaders());
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list