[Pkg-owncloud-commits] [php-sabredav] 94/220: Tests are passing. Weird!
David Prévot
taffit at moszumanska.debian.org
Thu May 12 01:21:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit cdd27f0401ee7954f6996a6f74e82c71a54f5912
Author: Evert Pot <me at evertpot.com>
Date: Wed Mar 23 01:22:09 2016 -0400
Tests are passing. Weird!
---
lib/CalDAV/Xml/Request/Share.php | 2 +-
tests/Sabre/CalDAV/SharingPluginTest.php | 21 ++++++++-----
tests/Sabre/CalDAV/Xml/Request/ShareTest.php | 45 +++++++++++++---------------
3 files changed, 36 insertions(+), 32 deletions(-)
diff --git a/lib/CalDAV/Xml/Request/Share.php b/lib/CalDAV/Xml/Request/Share.php
index 1339fc3..22c01f3 100644
--- a/lib/CalDAV/Xml/Request/Share.php
+++ b/lib/CalDAV/Xml/Request/Share.php
@@ -96,7 +96,7 @@ class Share implements XmlDeserializable {
case '{' . Plugin::NS_CALENDARSERVER . '}remove' :
$sharees[] = new Sharee([
- 'href' => $elem['value']['{DAV:}href'],
+ 'href' => $elem['value']['{DAV:}href'],
'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS
]);
break;
diff --git a/tests/Sabre/CalDAV/SharingPluginTest.php b/tests/Sabre/CalDAV/SharingPluginTest.php
index 1eb2365..4041360 100644
--- a/tests/Sabre/CalDAV/SharingPluginTest.php
+++ b/tests/Sabre/CalDAV/SharingPluginTest.php
@@ -179,13 +179,20 @@ RRR;
$response = $this->request($request, 200);
- $this->assertEquals([[
- 'href' => 'mailto:joe at example.org',
- 'commonName' => 'Joe Shmoe',
- 'readOnly' => false,
- 'status' => SharingPlugin::STATUS_NORESPONSE,
- 'summary' => '',
- ]], $this->caldavBackend->getShares(1));
+ $this->assertEquals(
+ [
+ new Sharee([
+ 'href' => 'mailto:joe at example.org',
+ 'properties' => [
+ '{DAV:}displayname' => 'Joe Shmoe',
+ ],
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE,
+ 'inviteStatus' => \Sabre\DAV\Sharing\Plugin::INVITE_NORESPONSE,
+ 'comment' => '',
+ ]),
+ ],
+ $this->caldavBackend->getInvites(1)
+ );
// Wiping out tree cache
$this->server->tree->markDirty('');
diff --git a/tests/Sabre/CalDAV/Xml/Request/ShareTest.php b/tests/Sabre/CalDAV/Xml/Request/ShareTest.php
index ad9e130..b9d642b 100644
--- a/tests/Sabre/CalDAV/Xml/Request/ShareTest.php
+++ b/tests/Sabre/CalDAV/Xml/Request/ShareTest.php
@@ -3,6 +3,7 @@
namespace Sabre\CalDAV\Xml\Request;
use Sabre\DAV\Xml\XmlTest;
+use Sabre\DAV\Xml\Element\Sharee;
class ShareTest extends XmlTest {
@@ -29,19 +30,20 @@ class ShareTest extends XmlTest {
XML;
$result = $this->parse($xml);
- $share = new Share(
- [
- [
- 'href' => 'mailto:eric at example.com',
- 'commonName' => 'Eric York',
- 'summary' => 'Shared workspace',
- 'readOnly' => false,
- ]
- ],
- [
- 'mailto:foo at bar',
- ]
- );
+ $share = new Share([
+ new Sharee([
+ 'href' => 'mailto:eric at example.com',
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READWRITE,
+ 'properties' => [
+ '{DAV:}displayname' => 'Eric York',
+ ],
+ 'comment' => 'Shared workspace',
+ ]),
+ new Sharee([
+ 'href' => 'mailto:foo at bar',
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_NOACCESS,
+ ]),
+ ]);
$this->assertEquals(
$share,
@@ -64,17 +66,12 @@ XML;
XML;
$result = $this->parse($xml);
- $share = new Share(
- [
- [
- 'href' => 'mailto:eric at example.com',
- 'commonName' => null,
- 'summary' => null,
- 'readOnly' => true,
- ]
- ],
- []
- );
+ $share = new Share([
+ new Sharee([
+ 'href' => 'mailto:eric at example.com',
+ 'access' => \Sabre\DAV\Sharing\Plugin::ACCESS_READ,
+ ]),
+ ]);
$this->assertEquals(
$share,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list