[Pkg-owncloud-commits] [php-sabredav] 96/163: calendar object test.

David Prévot taffit at moszumanska.debian.org
Tue May 20 18:54:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag upstream/2.0.0_beta1
in repository php-sabredav.

commit 8173e2fc15bd72656b0d49e42e4ea55650eb45f0
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Mon Apr 28 18:08:24 2014 -0400

    calendar object test.
---
 tests/Sabre/CalDAV/CalendarObjectTest.php | 36 +++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/tests/Sabre/CalDAV/CalendarObjectTest.php b/tests/Sabre/CalDAV/CalendarObjectTest.php
index 8e66454..095972a 100644
--- a/tests/Sabre/CalDAV/CalendarObjectTest.php
+++ b/tests/Sabre/CalDAV/CalendarObjectTest.php
@@ -209,6 +209,42 @@ class CalendarObjectTest extends \PHPUnit_Framework_TestCase {
 
     }
 
+    function testDefaultACL() {
+
+        $backend = new Backend\Mock([], []);
+        $calendarObject = new CalendarObject($backend, ['principaluri' => 'principals/user1'], ['calendarid' => 1, 'uri' => 'foo']);
+        $expected = array(
+            array(
+                'privilege' => '{DAV:}read',
+                'principal' => 'principals/user1',
+                'protected' => true,
+            ),
+            array(
+                'privilege' => '{DAV:}write',
+                'principal' => 'principals/user1',
+                'protected' => true,
+            ),
+            array(
+                'privilege' => '{DAV:}read',
+                'principal' => 'principals/user1/calendar-proxy-write',
+                'protected' => true,
+            ),
+            array(
+                'privilege' => '{DAV:}write',
+                'principal' => 'principals/user1/calendar-proxy-write',
+                'protected' => true,
+            ),
+            array(
+                'privilege' => '{DAV:}read',
+                'principal' => 'principals/user1/calendar-proxy-read',
+                'protected' => true,
+            ),
+        );
+        $this->assertEquals($expected, $calendarObject->getACL());
+
+
+    }
+
     /**
      * @expectedException Sabre\DAV\Exception\MethodNotAllowed
      */

-- 
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