[Pkg-owncloud-commits] [php-sabredav] 02/17: Switched to new api for creating request objects.

David Prévot taffit at moszumanska.debian.org
Thu Dec 11 15:10:55 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 e46a570347f1b51f626826fa9b335212339ba0bf
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Mon Nov 24 00:19:04 2014 -0500

    Switched to new api for creating request objects.
---
 .../Sabre/CalDAV/Schedule/FreeBusyRequestTest.php  | 91 +++++++++++-----------
 1 file changed, 46 insertions(+), 45 deletions(-)

diff --git a/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php b/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php
index 614934b..e342772 100644
--- a/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php
+++ b/tests/Sabre/CalDAV/Schedule/FreeBusyRequestTest.php
@@ -94,11 +94,11 @@ END:VCALENDAR',
 
     function testWrongContentType() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/plain',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/plain']
+        );
 
         $this->assertNull(
             $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse)
@@ -108,11 +108,11 @@ END:VCALENDAR',
 
     function testNotFound() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/blabla',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/blabla',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $this->assertNull(
             $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse)
@@ -122,11 +122,11 @@ END:VCALENDAR',
 
     function testNotOutbox() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/inbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/inbox',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $this->assertNull(
             $this->plugin->httpPost($this->server->httpRequest, $this->server->httpResponse)
@@ -139,11 +139,11 @@ END:VCALENDAR',
      */
     function testNoItipMethod() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $body = <<<ICS
 BEGIN:VCALENDAR
@@ -162,11 +162,11 @@ ICS;
      */
     function testNoVFreeBusy() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $body = <<<ICS
 BEGIN:VCALENDAR
@@ -186,11 +186,12 @@ ICS;
      */
     function testIncorrectOrganizer() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/calendar']
+        );
+
 
         $body = <<<ICS
 BEGIN:VCALENDAR
@@ -211,11 +212,11 @@ ICS;
      */
     function testNoAttendees() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $body = <<<ICS
 BEGIN:VCALENDAR
@@ -236,11 +237,11 @@ ICS;
      */
     function testNoDTStart() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $body = <<<ICS
 BEGIN:VCALENDAR
@@ -259,11 +260,11 @@ ICS;
 
     function testSucceed() {
 
-        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
-            'CONTENT_TYPE' => 'text/calendar',
-            'REQUEST_METHOD' => 'POST',
-            'REQUEST_URI' => '/calendars/user1/outbox',
-        ));
+        $this->server->httpRequest = new HTTP\Request(
+            'POST',
+            '/calendars/user1/outbox',
+            ['Content-Type' => 'text/calendar']
+        );
 
         $body = <<<ICS
 BEGIN:VCALENDAR

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