Author: ts
Date: Tue Oct  9 20:35:30 2007
New Revision: 6409

Log:
- Missed file.

Added:
    trunk/Webdav/tests/scripts/client_test_generate_mock.php   (with props)

Added: trunk/Webdav/tests/scripts/client_test_generate_mock.php
==============================================================================
--- trunk/Webdav/tests/scripts/client_test_generate_mock.php (added)
+++ trunk/Webdav/tests/scripts/client_test_generate_mock.php [iso-8859-1] Tue 
Oct  9 20:35:30 2007
@@ -1,0 +1,31 @@
+<?php
+
+class tsWebdavTransportMock extends ezcWebdavTransport
+{
+
+    protected function retreiveBody()
+    {
+        $body = parent::retreiveBody();
+        $GLOBALS['TS_REQUEST_BODY'] = $body;
+        return $body;
+    }
+
+    protected function parseHeaders( array $headerNames )
+    {
+        $headers = parent::parseHeaders( $headerNames );
+        $GLOBALS['TS_REQUEST_HEADERS'] = $headers;
+        return $headers;
+    }
+
+    protected function sendResponse( ezcWebdavDisplayInformation $info )
+    {
+        $GLOBALS['TS_RESPONSE_INFO'] = $info;
+        ob_start();
+        parent::sendResponse( $info );
+        $GLOBALS['TS_RESPONSE_BODY'] = ob_get_contents();
+        ob_flush();
+        $GLOBALS['TS_RESPONSE_HEADERS'] = $info->response->getHeaders();
+    }
+}
+
+?>

Propchange: trunk/Webdav/tests/scripts/client_test_generate_mock.php
------------------------------------------------------------------------------
    svn:eol-style = native


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to