[Pkg-owncloud-commits] [php-sabredav] 155/163: Fixed broken unittests.

David Prévot taffit at moszumanska.debian.org
Tue May 20 18:55:04 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 a841bb51592459ea026191e99af622ac5f8b2da6
Author: Evert Pot <me at evertpot.com>
Date:   Thu May 15 19:06:59 2014 -0400

    Fixed broken unittests.
---
 lib/CalDAV/Backend/PDO.php                       |  2 +-
 tests/Sabre/CalDAV/Backend/AbstractPDOTest.php   |  2 +-
 tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php | 10 ----------
 tests/Sabre/DAV/ServerPropsTest.php              | 16 ----------------
 tests/Sabre/DAV/Sync/PluginTest.php              | 20 ++++++++++----------
 5 files changed, 12 insertions(+), 38 deletions(-)

diff --git a/lib/CalDAV/Backend/PDO.php b/lib/CalDAV/Backend/PDO.php
index 5ca22fd..8cb3b4d 100644
--- a/lib/CalDAV/Backend/PDO.php
+++ b/lib/CalDAV/Backend/PDO.php
@@ -163,7 +163,7 @@ class PDO extends AbstractBackend implements SyncSupport, SubscriptionSupport {
                 'id' => $row['id'],
                 'uri' => $row['uri'],
                 'principaluri' => $row['principaluri'],
-                '{' . CalDAV\Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabredav.org/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
+                '{' . CalDAV\Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
                 '{DAV:}sync-token' => $row['synctoken']?$row['synctoken']:'0',
                 '{' . CalDAV\Plugin::NS_CALDAV . '}supported-calendar-component-set' => new CalDAV\Property\SupportedCalendarComponentSet($components),
                 '{' . CalDAV\Plugin::NS_CALDAV . '}schedule-calendar-transp' => new CalDAV\Property\ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
diff --git a/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php b/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
index ac1016a..ee89fdd 100644
--- a/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
+++ b/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
@@ -93,7 +93,7 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
             '{DAV:}displayname' => 'myCalendar',
             '{urn:ietf:params:xml:ns:caldav}calendar-description' => '',
             '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => '',
-            '{http://calendarserver.org/ns/}getctag' => 'http://sabredav.org/ns/sync/2',
+            '{http://calendarserver.org/ns/}getctag' => 'http://sabre.io/ns/sync/2',
             '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Property\ScheduleCalendarTransp('transparent'),
         );
 
diff --git a/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php b/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php
index 683e897..d3ede33 100644
--- a/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php
+++ b/tests/Sabre/DAV/ServerPropsInfiniteDepthTest.php
@@ -48,20 +48,10 @@ class ServerPropsInfiniteDepthTest extends AbstractServer {
         $hasFired = false;
 
         $self = $this;
-        // Also testing the beforeGetPropertiesForPath event.
-        $this->server->on('beforeGetPropertiesForPath', function($path, $properties, $depth) use ($self, &$hasFired) {
-
-            $hasFired = true;
-            $self->assertEquals('', $path);
-            $self->assertEquals([], $properties);
-            $self->assertEquals(-1, $depth);
-
-        });
 
         $this->sendRequest("");
 
         $this->assertEquals(207, $this->response->status, 'Incorrect status received. Full response body: ' . $this->response->getBodyAsString());
-        $this->assertTrue($hasFired);
 
         $this->assertEquals(array(
                 'Content-Type' => 'application/xml; charset=utf-8',
diff --git a/tests/Sabre/DAV/ServerPropsTest.php b/tests/Sabre/DAV/ServerPropsTest.php
index a09dc57..596dc14 100644
--- a/tests/Sabre/DAV/ServerPropsTest.php
+++ b/tests/Sabre/DAV/ServerPropsTest.php
@@ -50,23 +50,7 @@ class ServerPropsTest extends AbstractServer {
 
     public function testPropFindEmptyBody() {
 
-        $hasFired = false;
-
-        $self = $this;
-        // Also testing the beforeGetPropertiesForPath event.
-        $this->server->on('beforeGetPropertiesForPath', function($path, $properties, $depth) use ($self, &$hasFired) {
-
-            $hasFired = true;
-            $self->assertEquals('', $path);
-            $self->assertEquals([], $properties);
-            $self->assertEquals(0, $depth);
-
-        });
-
         $this->sendRequest("");
-
-        $this->assertTrue($hasFired);
-
         $this->assertEquals(207, $this->response->status);
 
         $this->assertEquals(array(
diff --git a/tests/Sabre/DAV/Sync/PluginTest.php b/tests/Sabre/DAV/Sync/PluginTest.php
index 534600a..662e9a8 100644
--- a/tests/Sabre/DAV/Sync/PluginTest.php
+++ b/tests/Sabre/DAV/Sync/PluginTest.php
@@ -98,7 +98,7 @@ BLA;
 
         // Checking the sync-token
         $this->assertEquals(
-            'http://sabredav.org/ns/sync/1',
+            'http://sabre.io/ns/sync/1',
             $dom->getElementsByTagNameNS('urn:DAV', 'sync-token')->item(0)->nodeValue
         );
 
@@ -148,7 +148,7 @@ BLA;
         $body = <<<BLA
 <?xml version="1.0" encoding="utf-8" ?>
 <D:sync-collection xmlns:D="DAV:">
-     <D:sync-token>http://sabredav.org/ns/sync/1</D:sync-token>
+     <D:sync-token>http://sabre.io/ns/sync/1</D:sync-token>
      <D:sync-level>infinite</D:sync-level>
       <D:prop>
         <D:getcontentlength/>
@@ -168,7 +168,7 @@ BLA;
 
         // Checking the sync-token
         $this->assertEquals(
-            'http://sabredav.org/ns/sync/2',
+            'http://sabre.io/ns/sync/2',
             $dom->getElementsByTagNameNS('urn:DAV', 'sync-token')->item(0)->nodeValue
         );
 
@@ -214,7 +214,7 @@ BLA;
         $body = <<<BLA
 <?xml version="1.0" encoding="utf-8" ?>
 <D:sync-collection xmlns:D="DAV:">
-    <D:sync-token>http://sabredav.org/ns/sync/1</D:sync-token>
+    <D:sync-token>http://sabre.io/ns/sync/1</D:sync-token>
     <D:sync-level>infinite</D:sync-level>
     <D:prop>
         <D:getcontentlength/>
@@ -235,7 +235,7 @@ BLA;
 
         // Checking the sync-token
         $this->assertEquals(
-            'http://sabredav.org/ns/sync/2',
+            'http://sabre.io/ns/sync/2',
             $dom->getElementsByTagNameNS('urn:DAV', 'sync-token')->item(0)->nodeValue
         );
 
@@ -272,7 +272,7 @@ BLA;
         $body = <<<BLA
 <?xml version="1.0" encoding="utf-8" ?>
 <D:sync-collection xmlns:D="DAV:">
-     <D:sync-token>http://sabredav.org/ns/sync/1</D:sync-token>
+     <D:sync-token>http://sabre.io/ns/sync/1</D:sync-token>
       <D:prop>
         <D:getcontentlength/>
       </D:prop>
@@ -291,7 +291,7 @@ BLA;
 
         // Checking the sync-token
         $this->assertEquals(
-            'http://sabredav.org/ns/sync/2',
+            'http://sabre.io/ns/sync/2',
             $dom->getElementsByTagNameNS('urn:DAV', 'sync-token')->item(0)->nodeValue
         );
 
@@ -391,7 +391,7 @@ BLA;
         $body = <<<BLA
 <?xml version="1.0" encoding="utf-8" ?>
 <D:sync-collection xmlns:D="DAV:">
-     <D:sync-token>http://sabredav.org/ns/sync/invalid</D:sync-token>
+     <D:sync-token>http://sabre.io/ns/sync/invalid</D:sync-token>
      <D:sync-level>1</D:sync-level>
       <D:prop>
         <D:getcontentlength/>
@@ -499,7 +499,7 @@ BLA;
         $request = HTTP\Sapi::createFromServerArray([
             'REQUEST_METHOD' => 'DELETE',
             'REQUEST_URI'    => '/coll/file1.txt',
-            'HTTP_IF'        => '</coll> (<http://sabredav.org/ns/sync/1>)',
+            'HTTP_IF'        => '</coll> (<http://sabre.io/ns/sync/1>)',
         ]);
         $response = $this->request($request);
 
@@ -516,7 +516,7 @@ BLA;
         $request = HTTP\Sapi::createFromServerArray([
             'REQUEST_METHOD' => 'DELETE',
             'REQUEST_URI'    => '/coll/file1.txt',
-            'HTTP_IF'        => '</coll> (Not <http://sabredav.org/ns/sync/2>)',
+            'HTTP_IF'        => '</coll> (Not <http://sabre.io/ns/sync/2>)',
         ]);
         $response = $this->request($request);
 

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