aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-08-16 10:32:35 +0200
committerMario Vavti <mario@mariovavti.com>2017-08-16 10:32:35 +0200
commit4a7384bc0ce1893a432bf4b7d67bca23796fe9db (patch)
tree5623c66a3f66445284529d6207e4ab4a2edb2810 /vendor/sabre/dav/tests/Sabre
parentc664a4bdcd1bd578f5ec3c2884f7c97e9f68d2d7 (diff)
parent90bc21f2d560d879d7eaf05a85af6d6dca53ebac (diff)
downloadvolse-hubzilla-2.6.tar.gz
volse-hubzilla-2.6.tar.bz2
volse-hubzilla-2.6.zip
Merge branch '2.6RC'2.6
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php14
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php3
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php4
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php6
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php4
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php51
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php6
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php13
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php5
-rw-r--r--vendor/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php10
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ClientTest.php6
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Issue33Test.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php8
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php6
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Mock/Collection.php3
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php7
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php5
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php8
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php2
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php7
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php5
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php2
30 files changed, 138 insertions, 55 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
index 2a00f7925..406dbe0e8 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
@@ -280,7 +280,7 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
],
];
- $result = $backend->getMultipleCalendarObjects($returnedId, [ 'id-1', 'id-2' ]);
+ $result = $backend->getMultipleCalendarObjects($returnedId, ['id-1', 'id-2']);
foreach ($check as $index => $props) {
@@ -441,7 +441,7 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
/**
* @depends testCreateCalendarObject
*/
- function testCreateCalendarObjectInfiniteReccurence() {
+ function testCreateCalendarObjectInfiniteRecurrence() {
$backend = new PDO($this->pdo);
$returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []);
@@ -470,7 +470,7 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
/**
* @depends testCreateCalendarObject
*/
- function testCreateCalendarObjectEndingReccurence() {
+ function testCreateCalendarObjectEndingRecurrence() {
$backend = new PDO($this->pdo);
$returnedId = $backend->createCalendar('principals/user2', 'somerandomid', []);
@@ -1246,8 +1246,8 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
$calendar['id'],
[
new Sharee([
- 'href' => 'mailto:user@example.org',
- 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS,
+ 'href' => 'mailto:user@example.org',
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS,
])
]
);
@@ -1263,8 +1263,8 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
$calendar['id'],
[
new Sharee([
- 'href' => 'principals/user2',
- 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS,
+ 'href' => 'principals/user2',
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS,
])
]
);
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php
index d4dcc07dc..cc665cd8f 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Backend/Mock.php
@@ -2,8 +2,8 @@
namespace Sabre\CalDAV\Backend;
-use Sabre\DAV;
use Sabre\CalDAV;
+use Sabre\DAV;
class Mock extends AbstractBackend {
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
index 0d98922ff..c92cde661 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarObjectTest.php
@@ -114,7 +114,7 @@ class CalendarObjectTest extends \PHPUnit_Framework_TestCase {
$obj = $children[0];
$obj->delete();
- $children2 = $this->calendar->getChildren();
+ $children2 = $this->calendar->getChildren();
$this->assertEquals(count($children) - 1, count($children2));
}
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php
index 4c2558a9b..f3305163b 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/CalendarQueryValidatorTest.php
@@ -21,6 +21,9 @@ ICS;
}
/**
+ * @param string $icalObject
+ * @param array $filters
+ * @param int $outcome
* @dataProvider provider
*/
function testValid($icalObject, $filters, $outcome) {
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php
index 7a756774f..7604c7f4c 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/FreeBusyReportTest.php
@@ -11,11 +11,11 @@ require_once 'Sabre/HTTP/ResponseMock.php';
class FreeBusyReportTest extends \PHPUnit_Framework_TestCase {
/**
- * @var Sabre\CalDAV\Plugin
+ * @var Plugin
*/
protected $plugin;
/**
- * @var Sabre\DAV\Server
+ * @var DAV\Server
*/
protected $server;
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php
index 9719529fb..75412577e 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/ICSExportPluginTest.php
@@ -3,9 +3,9 @@
namespace Sabre\CalDAV;
use Sabre\DAV;
+use Sabre\DAVACL;
use Sabre\HTTP;
use Sabre\VObject;
-use Sabre\DAVACL;
class ICSExportPluginTest extends \Sabre\DAVServerTest {
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
index 8d538dee5..859f6aa0c 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/PluginTest.php
@@ -2,11 +2,11 @@
namespace Sabre\CalDAV;
-use Sabre\DAVACL;
-use Sabre\DAV;
-use Sabre\HTTP;
use DateTime;
use DateTimeZone;
+use Sabre\DAV;
+use Sabre\DAVACL;
+use Sabre\HTTP;
class PluginTest extends \PHPUnit_Framework_TestCase {
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php b/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php
index 6e9e88419..9589176a3 100644
--- a/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/SharingPluginTest.php
@@ -194,8 +194,8 @@ RRR;
$this->assertEquals(
[
new Sharee([
- 'href' => 'mailto:joe@example.org',
- 'properties' => [
+ 'href' => 'mailto:joe@example.org',
+ 'properties' => [
'{DAV:}displayname' => 'Joe Shmoe',
],
'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE,
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php
index 2c3171bf3..f8da38a16 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookQueryTest.php
@@ -2,8 +2,8 @@
namespace Sabre\CardDAV;
-use Sabre\HTTP;
use Sabre\DAV;
+use Sabre\HTTP;
require_once 'Sabre/CardDAV/AbstractPluginTest.php';
require_once 'Sabre/HTTP/ResponseMock.php';
@@ -288,14 +288,14 @@ class AddressBookQueryTest extends AbstractPluginTest {
);
$request->setBody(
-'<?xml version="1.0"?>
+ '<?xml version="1.0"?>
<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav">
<d:prop>
<c:address-data content-type="application/vcard+json" />
<d:getetag />
</d:prop>
</c:addressbook-query>'
- );
+ );
$response = new HTTP\ResponseMock();
@@ -305,6 +305,51 @@ class AddressBookQueryTest extends AbstractPluginTest {
$this->server->exec();
$this->assertEquals(415, $response->status, 'Incorrect status code. Full response body:' . $response->body);
+ }
+
+ function testAddressBookProperties() {
+
+ $request = new HTTP\Request(
+ 'REPORT',
+ '/addressbooks/user1/book3',
+ ['Depth' => '1']
+ );
+
+ $request->setBody(
+ '<?xml version="1.0"?>
+<c:addressbook-query xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:carddav">
+ <d:prop>
+ <c:address-data>
+ <c:prop name="FN"/>
+ <c:prop name="BDAY"/>
+ </c:address-data>
+ <d:getetag />
+ </d:prop>
+</c:addressbook-query>'
+ );
+
+ $response = new HTTP\ResponseMock();
+
+ $this->server->httpRequest = $request;
+ $this->server->httpResponse = $response;
+
+ $this->server->exec();
+
+ $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body);
+
+ // using the client for parsing
+ $client = new DAV\Client(['baseUri' => '/']);
+
+ $result = $client->parseMultiStatus($response->body);
+
+ $this->assertEquals([
+ '/addressbooks/user1/book3/card3' => [
+ 200 => [
+ '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nFN:Test-Card\nEMAIL;TYPE=home:bar@example.org\nEND:VCARD") . '"',
+ '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\r\nVERSION:3.0\r\nUID:12345\r\nFN:Test-Card\r\nEND:VCARD\r\n",
+ ],
+ ],
+ ], $result);
}
}
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php
index 1a36fd10c..1f0064dd3 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/AddressBookTest.php
@@ -85,7 +85,7 @@ class AddressBookTest extends \PHPUnit_Framework_TestCase {
function testDelete() {
$this->ab->delete();
- $this->assertEquals([], $this->backend->addressBooks);
+ $this->assertEquals(1, count($this->backend->addressBooks));
}
@@ -175,7 +175,7 @@ class AddressBookTest extends \PHPUnit_Framework_TestCase {
$backend = new Backend\PDO(
$this->getPDO()
);
- $ab = new AddressBook($backend, [ 'id' => 1, '{DAV:}sync-token' => 2]);
+ $ab = new AddressBook($backend, ['id' => 1, '{DAV:}sync-token' => 2]);
$this->assertEquals(2, $ab->getSyncToken());
}
@@ -187,7 +187,7 @@ class AddressBookTest extends \PHPUnit_Framework_TestCase {
$backend = new Backend\PDO(
$this->getPDO()
);
- $ab = new AddressBook($backend, [ 'id' => 1, '{http://sabredav.org/ns}sync-token' => 2]);
+ $ab = new AddressBook($backend, ['id' => 1, '{http://sabredav.org/ns}sync-token' => 2]);
$this->assertEquals(2, $ab->getSyncToken());
}
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php b/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php
index 840b898e8..8638dc74a 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/Backend/Mock.php
@@ -20,6 +20,12 @@ class Mock extends AbstractBackend {
'principaluri' => 'principals/user1',
'{DAV:}displayname' => 'd-name',
],
+ [
+ 'id' => 'bar',
+ 'uri' => 'book3',
+ 'principaluri' => 'principals/user1',
+ '{DAV:}displayname' => 'd-name',
+ ],
];
$card2 = fopen('php://memory', 'r+');
@@ -30,6 +36,9 @@ class Mock extends AbstractBackend {
'card1' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD",
'card2' => $card2,
],
+ 'bar' => [
+ 'card3' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nFN:Test-Card\nEMAIL;TYPE=home:bar@example.org\nEND:VCARD",
+ ],
];
}
@@ -58,7 +67,7 @@ class Mock extends AbstractBackend {
* Calling the handle method is like telling the PropPatch object "I
* promise I can handle updating this property".
*
- * Read the PropPatch documenation for more info and examples.
+ * Read the PropPatch documentation for more info and examples.
*
* @param string $addressBookId
* @param \Sabre\DAV\PropPatch $propPatch
@@ -117,7 +126,7 @@ class Mock extends AbstractBackend {
* calculating them. If they are specified, you can also ommit carddata.
* This may speed up certain requests, especially with large cards.
*
- * @param mixed $addressbookId
+ * @param mixed $addressBookId
* @return array
*/
function getCards($addressBookId) {
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php
index d79239d0f..2d57c6ae7 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php
@@ -2,8 +2,8 @@
namespace Sabre\CardDAV;
-use Sabre\HTTP;
use Sabre\DAV;
+use Sabre\HTTP;
require_once 'Sabre/HTTP/ResponseMock.php';
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php
index 0ba4fd669..d4bc48098 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/SogoStripContentTypeTest.php
@@ -2,8 +2,8 @@
namespace Sabre\CardDAV;
-use Sabre\HTTP;
use Sabre\DAV\PropFind;
+use Sabre\HTTP;
class SogoStripContentTypeTest extends \Sabre\DAVServerTest {
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php
index 57ac21b4a..03c468f86 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateFilterTest.php
@@ -7,6 +7,11 @@ require_once 'Sabre/CardDAV/AbstractPluginTest.php';
class ValidateFilterTest extends AbstractPluginTest {
/**
+ * @param string $input
+ * @param array $filters
+ * @param string $test
+ * @param bool $result
+ * @param string|null $message
* @dataProvider data
*/
function testFilter($input, $filters, $test, $result, $message = null) {
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php
index dda8a0c37..acba2cfc8 100644
--- a/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php
+++ b/vendor/sabre/dav/tests/Sabre/CardDAV/ValidateVCardTest.php
@@ -3,8 +3,8 @@
namespace Sabre\CardDAV;
use Sabre\DAV;
-use Sabre\HTTP;
use Sabre\DAVACL;
+use Sabre\HTTP;
require_once 'Sabre/HTTP/ResponseMock.php';
@@ -293,10 +293,10 @@ VCF;
$response = $this->request($request, 204);
$expected = [
- 'uri' => 'blabla.vcf',
- 'carddata' => $body,
- 'size' => strlen($body),
- 'etag' => '"' . md5($body) . '"',
+ 'uri' => 'blabla.vcf',
+ 'carddata' => $body,
+ 'size' => strlen($body),
+ 'etag' => '"' . md5($body) . '"',
];
$this->assertEquals($expected, $this->cardBackend->getCard('addressbook1', 'blabla.vcf'));
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php
index b30b3f143..369bc249e 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Auth/Backend/Mock.php
@@ -76,6 +76,8 @@ class Mock implements BackendInterface {
* append your own WWW-Authenticate header instead of overwriting the
* existing one.
*
+ * @param RequestInterface $request
+ * @param ResponseInterface $response
* @return void
*/
function challenge(RequestInterface $request, ResponseInterface $response) {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php
index b566dd757..743446127 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Auth/PluginTest.php
@@ -2,8 +2,8 @@
namespace Sabre\DAV\Auth;
-use Sabre\HTTP;
use Sabre\DAV;
+use Sabre\HTTP;
class PluginTest extends \PHPUnit_Framework_TestCase {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ClientTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ClientTest.php
index 4cf27dfaa..687f61e2f 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/ClientTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/ClientTest.php
@@ -224,7 +224,7 @@ XML;
XML;
$client->response = new Response(207, [], $responseBody);
- $result = $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null], 1);
+ $result = $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null]);
$this->assertTrue($result);
$request = $client->request;
$this->assertEquals('PROPPATCH', $request->getMethod());
@@ -246,7 +246,7 @@ XML;
]);
$client->response = new Response(403, [], '');
- $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null], 1);
+ $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null]);
}
@@ -276,7 +276,7 @@ XML;
XML;
$client->response = new Response(207, [], $responseBody);
- $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null], 1);
+ $client->propPatch('foo', ['{DAV:}displayname' => 'hi', '{urn:zim}gir' => null]);
}
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php
index 8788475cb..174a561b5 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Exception/LockedTest.php
@@ -2,8 +2,8 @@
namespace Sabre\DAV\Exception;
-use Sabre\DAV;
use DOMDocument;
+use Sabre\DAV;
class LockedTest extends \PHPUnit_Framework_TestCase {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Issue33Test.php b/vendor/sabre/dav/tests/Sabre/DAV/Issue33Test.php
index edd09e634..ba2cf3dc1 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Issue33Test.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Issue33Test.php
@@ -99,7 +99,7 @@ class Issue33Test extends \PHPUnit_Framework_TestCase {
$server->sapi = new HTTP\SapiMock();
$server->exec();
- $this->assertTrue(file_exists(SABRE_TEMPDIR . '/issue33/' . urldecode('%C3%A0fo%C3%B3')));
+ $this->assertTrue(file_exists(SABRE_TEMPDIR . '/issue33/' . urldecode('%C3%A0fo%C3%B3')));
}
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php
index f08f19da5..1111db5b5 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Locks/MSWordTest.php
@@ -2,8 +2,8 @@
namespace Sabre\DAV\Locks;
-use Sabre\HTTP;
use Sabre\DAV;
+use Sabre\HTTP;
require_once 'Sabre/HTTP/ResponseMock.php';
require_once 'Sabre/TestUtil.php';
@@ -112,9 +112,9 @@ class MSWordTest extends \PHPUnit_Framework_TestCase {
function getPutRequest($lockToken) {
$request = HTTP\Sapi::createFromServerArray([
- 'REQUEST_METHOD' => 'PUT',
- 'REQUEST_URI' => '/Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx',
- 'HTTP_IF' => 'If: (' . $lockToken . ')',
+ 'REQUEST_METHOD' => 'PUT',
+ 'REQUEST_URI' => '/Nouveau%20Microsoft%20Office%20Excel%20Worksheet.xlsx',
+ 'HTTP_IF' => 'If: (' . $lockToken . ')',
]);
$request->setBody('FAKE BODY');
return $request;
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php
index 6511d4e7d..dbbf6757a 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Locks/PluginTest.php
@@ -2,8 +2,8 @@
namespace Sabre\DAV\Locks;
-use Sabre\HTTP;
use Sabre\DAV;
+use Sabre\HTTP;
require_once 'Sabre/DAV/AbstractServer.php';
@@ -168,7 +168,7 @@ class PluginTest extends DAV\AbstractServer {
$this->response = new HTTP\ResponseMock();
$this->server->httpResponse = $this->response;
- $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . ')' ]);
+ $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . ')']);
$request->setBody('');
$this->server->httpRequest = $request;
@@ -203,7 +203,7 @@ class PluginTest extends DAV\AbstractServer {
$this->response = new HTTP\ResponseMock();
$this->server->httpResponse = $this->response;
- $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . 'foobar) (<opaquelocktoken:anotherbadtoken>)' ]);
+ $request = new HTTP\Request('LOCK', '/test.txt', ['If' => '(' . $lockToken . 'foobar) (<opaquelocktoken:anotherbadtoken>)']);
$request->setBody('');
$this->server->httpRequest = $request;
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Mock/Collection.php b/vendor/sabre/dav/tests/Sabre/DAV/Mock/Collection.php
index 6ccab4f66..fded5e474 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Mock/Collection.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Mock/Collection.php
@@ -30,6 +30,7 @@ class Collection extends DAV\Collection {
*
* @param string $name
* @param array $children
+ * @param Collection $parent
* @return void
*/
function __construct($name, array $children = [], Collection $parent = null) {
@@ -122,6 +123,8 @@ class Collection extends DAV\Collection {
/**
* Adds an already existing node to this collection.
+ *
+ * @param \Sabre\DAV\INode $node
*/
function addNode(\Sabre\DAV\INode $node) {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php b/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php
index 23855e3c5..a624b6b6b 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php
@@ -24,7 +24,9 @@ class File extends DAV\File {
* Creates the object
*
* @param string $name
- * @param array $children
+ * @param resource $contents
+ * @param Collection $parent
+ * @param int $lastModified
* @return void
*/
function __construct($name, $contents, Collection $parent = null, $lastModified = -1) {
@@ -57,6 +59,7 @@ class File extends DAV\File {
/**
* Changes the name of the node.
*
+ * @param string $name
* @return void
*/
function setName($name) {
@@ -70,7 +73,7 @@ class File extends DAV\File {
*
* The data argument is a readable stream resource.
*
- * After a succesful put operation, you may choose to return an ETag. The
+ * After a successful put operation, you may choose to return an ETag. The
* etag must always be surrounded by double-quotes. These quotes must
* appear in the actual string you're returning.
*
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php b/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php
index ca8ca3f6e..2c6274173 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php
@@ -38,6 +38,11 @@ class SpecificationTest extends \PHPUnit_Framework_TestCase {
}
/**
+ * @param string $headerValue
+ * @param string $httpStatus
+ * @param string $endResult
+ * @param int $contentLength
+ *
* @dataProvider data
*/
function testUpdateRange($headerValue, $httpStatus, $endResult, $contentLength = 4) {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php
index 4c576f108..42759647a 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerEventsTest.php
@@ -39,8 +39,8 @@ class ServerEventsTest extends AbstractServer {
$this->server->on('afterResponse', [$mock, 'afterResponseCallback']);
$this->server->httpRequest = HTTP\Sapi::createFromServerArray([
- 'REQUEST_METHOD' => 'GET',
- 'REQUEST_URI' => '/test.txt',
+ 'REQUEST_METHOD' => 'GET',
+ 'REQUEST_URI' => '/test.txt',
]);
$this->server->exec();
@@ -118,8 +118,8 @@ class ServerEventsTest extends AbstractServer {
);
} catch (Exception $e) {}
- $this->assertEquals(2, $k);
-
+ // Fun fact, PHP 7.1 changes the order when sorting-by-callback.
+ $this->assertTrue($k >= 2 && $k <= 3);
}
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php
index bafbef6e4..81224d687 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/ServerRangeTest.php
@@ -144,7 +144,7 @@ class ServerRangeTest extends \Sabre\DAVServerTest {
'Content-Length' => [4],
'Content-Range' => ['bytes 2-5/12'],
// 'ETag' => ['"' . md5('Test contents') . '"'],
- 'Last-Modified' => [$this->lastModified],
+ 'Last-Modified' => [$this->lastModified],
],
$response->getHeaders()
);
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php b/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php
index 8888f0276..e98fe9048 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/StringUtilTest.php
@@ -5,6 +5,13 @@ namespace Sabre\DAV;
class StringUtilTest extends \PHPUnit_Framework_TestCase {
/**
+ * @param string $haystack
+ * @param string $needle
+ * @param string $collation
+ * @param string $matchType
+ * @param string $result
+ * @throws Exception\BadRequest
+ *
* @dataProvider dataset
*/
function testTextMatch($haystack, $needle, $collation, $matchType, $result) {
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
index ad33200c8..e719e38d5 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/TreeTest.php
@@ -200,8 +200,8 @@ class TreeFileTester extends File implements IProperties {
* To update specific properties, call the 'handle' method on this object.
* Read the PropPatch documentation for more information.
*
- * @param array $mutations
- * @return bool|array
+ * @param PropPatch $propPatch
+ * @return void
*/
function propPatch(PropPatch $propPatch) {
@@ -220,6 +220,7 @@ class TreeMultiGetTester extends TreeDirectoryTester implements IMultiGet {
*
* If any children are not found, you do not have to return them.
*
+ * @param array $paths
* @return array
*/
function getMultipleChildren(array $paths) {
diff --git a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php
index afb094a39..1464f4c26 100644
--- a/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php
+++ b/vendor/sabre/dav/tests/Sabre/DAVACL/PrincipalBackend/Mock.php
@@ -128,7 +128,7 @@ class Mock extends AbstractBackend {
* Calling the handle method is like telling the PropPatch object "I
* promise I can handle updating this property".
*
- * Read the PropPatch documenation for more info and examples.
+ * Read the PropPatch documentation for more info and examples.
*
* @param string $path
* @param \Sabre\DAV\PropPatch $propPatch