[Pkg-owncloud-commits] [php-sabredav] 26/42: unit test for afterResponse event

David Prévot taffit at moszumanska.debian.org
Wed Oct 29 20:52:06 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 67ab2cc2a6b2955760de57c8f8208d253a39c69a
Author: Jose Ignacio <joserobleda at gmail.com>
Date:   Sun Oct 19 22:15:14 2014 +0200

    unit test for afterResponse event
---
 tests/Sabre/DAV/ServerEventsTest.php | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/Sabre/DAV/ServerEventsTest.php b/tests/Sabre/DAV/ServerEventsTest.php
index ea8bab9..1bf6feb 100644
--- a/tests/Sabre/DAV/ServerEventsTest.php
+++ b/tests/Sabre/DAV/ServerEventsTest.php
@@ -28,6 +28,22 @@ class ServerEventsTest extends AbstractServer {
 
     }
 
+    function testAfterResponse() {
+
+        $mock = $this->getMock('stdClass', array('afterResponseCallback'));
+        $mock->expects($this->once())->method('afterResponseCallback');
+
+        $this->server->on('afterResponse', [$mock, 'afterResponseCallback']);
+
+        $this->server->httpRequest = HTTP\Sapi::createFromServerArray(array(
+            'REQUEST_METHOD'    => 'GET',
+            'REQUEST_URI'       => '/test.txt',
+        ));
+
+        $this->server->exec();
+
+    }
+
     function testBeforeBindCancel() {
 
         $this->server->on('beforeBind', [$this,'beforeBindCancelHandler']);

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