[Pkg-owncloud-commits] [php-sabredav] 03/24: Fix for #422 on the 1.7.
David Prévot
taffit at moszumanska.debian.org
Tue May 20 17:19:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch 1.7
in repository php-sabredav.
commit 472b358c9dcd32f77d732e14739bee1848a17ff7
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Mon Mar 24 20:56:06 2014 -0400
Fix for #422 on the 1.7.
Also took the opportunity to reorganize some of the unittests a little
bit.
---
ChangeLog | 3 +
composer.json | 4 +-
lib/Sabre/DAV/Server.php | 6 +-
tests/Sabre/DAV/HttpPutTest.php | 357 ++++++++++++++++++++++++++++++
tests/Sabre/DAV/Mock/Collection.php | 120 ++++++++++
tests/Sabre/DAV/Mock/File.php | 113 ++++++++++
tests/Sabre/DAV/ServerFinderBlockTest.php | 50 -----
tests/Sabre/DAV/ServerSimpleTest.php | 98 --------
tests/Sabre/DAVServerTest.php | 11 +-
9 files changed, 607 insertions(+), 155 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1bc4c9c..bf37ba6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
1.7.12-stable (????-??-??)
* Fixed: Restoring old setting after changing
libxml_disable_entity_loader.
+ * Fixed: Issue #422 Preconditions were not being set on PUT on non-
+ existant files. Not really a chance for data-loss, but incorrect
+ nevertheless.
1.7.11-stable (2014-02-26)
* The zip release ships with sabre/vobject 2.1.3.
diff --git a/composer.json b/composer.json
index 67512d0..6f049d0 100644
--- a/composer.json
+++ b/composer.json
@@ -27,8 +27,8 @@
"ext-libxml" : "*"
},
"require-dev" : {
- "phpunit/phpunit" : "3.7.*",
- "phing/phing" : "2.4.14"
+ "phpunit/phpunit" : "~4.0.0",
+ "phing/phing" : "~2.4"
},
"provide" : {
"evert/sabredav" : "1.7.*"
diff --git a/lib/Sabre/DAV/Server.php b/lib/Sabre/DAV/Server.php
index 8f3aace..d11c75e 100644
--- a/lib/Sabre/DAV/Server.php
+++ b/lib/Sabre/DAV/Server.php
@@ -871,13 +871,13 @@ class Sabre_DAV_Server {
}
+ // Checking If-None-Match and related headers.
+ if (!$this->checkPreconditions()) return;
+
if ($this->tree->nodeExists($uri)) {
$node = $this->tree->getNodeForPath($uri);
- // Checking If-None-Match and related headers.
- if (!$this->checkPreconditions()) return;
-
// If the node is a collection, we'll deny it
if (!($node instanceof Sabre_DAV_IFile)) throw new Sabre_DAV_Exception_Conflict('PUT is not allowed on non-files.');
if (!$this->broadcastEvent('beforeWriteContent',array($uri, $node, &$body))) return false;
diff --git a/tests/Sabre/DAV/HttpPutTest.php b/tests/Sabre/DAV/HttpPutTest.php
new file mode 100644
index 0000000..47804c9
--- /dev/null
+++ b/tests/Sabre/DAV/HttpPutTest.php
@@ -0,0 +1,357 @@
+<?php
+
+/**
+ * Tests related to the PUT request.
+ *
+ * @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ * @covers Sabre_DAV_Server::httpPut
+ * @covers Sabre_DAV_Server::createFile
+ * @covers Sabre_DAV_Server::checkPreconditions
+ */
+class Sabre_DAV_HttpPutTest extends Sabre_DAVServerTest {
+
+ /**
+ * Sets up the DAV tree.
+ *
+ * @return void
+ */
+ public function setUpTree() {
+
+ $this->tree = new Sabre_DAV_Mock_Collection('root', array(
+ 'file1' => 'foo',
+ ));
+
+ }
+
+ /**
+ * A successful PUT of a new file.
+ */
+ public function testPut() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 201 Created', $response->status);
+
+ $this->assertEquals(
+ 'hello',
+ $this->server->tree->getNodeForPath('file2')->get()
+ );
+
+ $this->assertEquals(
+ array(
+ 'Content-Length' => '0',
+ 'ETag' => '"' . md5('hello') . '"'
+ ),
+ $response->headers
+ );
+
+ }
+
+ /**
+ * A successful PUT on an existing file.
+ *
+ * @depends testPut
+ */
+ public function testPutExisting() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file1',
+ 'REQUEST_METHOD' => 'PUT',
+ ));
+ $request->setBody('bar');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 204 No Content', $response->status);
+
+ $this->assertEquals(
+ 'bar',
+ $this->server->tree->getNodeForPath('file1')->get()
+ );
+
+ $this->assertEquals(
+ array(
+ 'Content-Length' => '0',
+ 'ETag' => '"' . md5('bar') . '"'
+ ),
+ $response->headers
+ );
+
+ }
+
+ /**
+ * PUT on existing file with If-Match: *
+ *
+ * @depends testPutExisting
+ */
+ public function testPutExistingIfMatchStar() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file1',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_IF_MATCH' => '*',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 204 No Content', $response->status);
+
+ $this->assertEquals(
+ 'hello',
+ $this->server->tree->getNodeForPath('file1')->get()
+ );
+
+ $this->assertEquals(
+ array(
+ 'Content-Length' => '0',
+ 'ETag' => '"' . md5('hello') . '"'
+ ),
+ $response->headers
+ );
+
+ }
+
+ /**
+ * PUT on existing file with If-Match: with a correct etag
+ *
+ * @depends testPutExisting
+ */
+ public function testPutExistingIfMatchCorrect() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file1',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_IF_MATCH' => '"' . md5('foo') . '"',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 204 No Content', $response->status);
+
+ $this->assertEquals(
+ 'hello',
+ $this->server->tree->getNodeForPath('file1')->get()
+ );
+
+ $this->assertEquals(
+ array(
+ 'Content-Length' => '0',
+ 'ETag' => '"' . md5('hello') . '"'
+ ),
+ $response->headers
+ );
+
+ }
+
+ /**
+ * PUT with Content-Range should be rejected.
+ *
+ * @depends testPut
+ */
+ public function testPutContentRange() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_CONTENT_RANGE' => 'bytes/100-200',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+ $this->assertEquals('HTTP/1.1 501 Not Implemented', $response->status);
+
+ }
+
+ /**
+ * PUT on non-existing file with If-None-Match: * should work.
+ *
+ * @depends testPut
+ */
+ public function testPutIfNoneMatchStar() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_IF_NONE_MATCH' => '*',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 201 Created', $response->status);
+
+ $this->assertEquals(
+ 'hello',
+ $this->server->tree->getNodeForPath('file2')->get()
+ );
+
+ $this->assertEquals(
+ array(
+ 'Content-Length' => '0',
+ 'ETag' => '"' . md5('hello') . '"'
+ ),
+ $response->headers
+ );
+
+ }
+
+ /**
+ * PUT on non-existing file with If-Match: * should fail.
+ *
+ * @depends testPut
+ */
+ public function testPutIfMatchStar() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_IF_MATCH' => '*',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 412 Precondition failed', $response->status);
+
+ }
+
+ /**
+ * PUT on existing file with If-None-Match: * should fail.
+ *
+ * @depends testPut
+ */
+ public function testPutExistingIfNoneMatchStar() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file1',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_IF_NONE_MATCH' => '*',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 412 Precondition failed', $response->status);
+
+ }
+
+ /**
+ * PUT thats created in a non-collection should be rejected.
+ *
+ * @depends testPut
+ */
+ public function testPutNoParent() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file1/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+ $this->assertEquals('HTTP/1.1 409 Conflict', $response->status);
+
+ }
+
+ /**
+ * Finder may sometimes make a request, which gets its content-body
+ * stripped. We can't always prevent this from happening, but in some cases
+ * we can detected this and return an error instead.
+ *
+ * @depends testPut
+ */
+ public function testFinderPutSuccess() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_X_EXPECTED_ENTITY_LENGTH' => '5',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 201 Created', $response->status);
+
+ $this->assertEquals(
+ 'hello',
+ $this->server->tree->getNodeForPath('file2')->get()
+ );
+
+ $this->assertEquals(
+ array(
+ 'Content-Length' => '0',
+ 'ETag' => '"' . md5('hello') . '"'
+ ),
+ $response->headers
+ );
+
+ }
+
+ /**
+ * Same as the last one, but in this case we're mimicing a failed request.
+ *
+ * @depends testFinderPutSuccess
+ */
+ public function testFinderPutFail() {
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ 'HTTP_X_EXPECTED_ENTITY_LENGTH' => '5',
+ ));
+ $request->setBody('');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 403 Forbidden', $response->status);
+
+ }
+
+ /**
+ * Plugins can intercept PUT. We need to make sure that works.
+ */
+ public function testPutIntercept() {
+
+ $this->server->subscribeEvent('beforeBind', array($this, 'beforeBind'));
+
+ $request = new Sabre_HTTP_Request(array(
+ 'REQUEST_URI' => '/file2',
+ 'REQUEST_METHOD' => 'PUT',
+ ));
+ $request->setBody('hello');
+
+ $response = $this->request($request);
+
+ $this->assertEquals('HTTP/1.1 418 I\'m a teapot', $response->status);
+
+ $this->assertFalse(
+ $this->server->tree->nodeExists('file2')
+ );
+
+ $this->assertEquals(
+ array(
+ ),
+ $response->headers
+ );
+
+ }
+
+ public function beforeBind() {
+
+ $this->server->httpResponse->sendStatus(418);
+ return false;
+
+ }
+
+}
diff --git a/tests/Sabre/DAV/Mock/Collection.php b/tests/Sabre/DAV/Mock/Collection.php
new file mode 100644
index 0000000..d27dd3f
--- /dev/null
+++ b/tests/Sabre/DAV/Mock/Collection.php
@@ -0,0 +1,120 @@
+<?php
+
+/**
+ * Mock Collection.
+ *
+ * This collection quickly allows you to create trees of nodes.
+ * Children are specified as an array.
+ *
+ * Every key a filename, every array value is either:
+ * * an array, for a sub-collection
+ * * a string, for a file
+ * * An instance of Sabre_DAV_INode.
+ *
+ * @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class Sabre_DAV_Mock_Collection extends Sabre_DAV_Collection {
+
+ protected $name;
+ protected $children;
+
+ /**
+ * Creates the object
+ *
+ * @param string $name
+ * @param array $children
+ * @return void
+ */
+ public function __construct($name, array $children = array()) {
+
+ $this->name = $name;
+ $this->children = $children;
+
+ }
+
+ /**
+ * Returns the name of the node.
+ *
+ * This is used to generate the url.
+ *
+ * @return string
+ */
+ public function getName() {
+
+ return $this->name;
+
+ }
+
+ /**
+ * Creates a new file in the directory
+ *
+ * Data will either be supplied as a stream resource, or in certain cases
+ * as a string. Keep in mind that you may have to support either.
+ *
+ * After successful creation of the file, you may choose to return the ETag
+ * of the new file here.
+ *
+ * The returned ETag must be surrounded by double-quotes (The quotes should
+ * be part of the actual string).
+ *
+ * If you cannot accurately determine the ETag, you should not return it.
+ * If you don't store the file exactly as-is (you're transforming it
+ * somehow) you should also not return an ETag.
+ *
+ * This means that if a subsequent GET to this new file does not exactly
+ * return the same contents of what was submitted here, you are strongly
+ * recommended to omit the ETag.
+ *
+ * @param string $name Name of the file
+ * @param resource|string $data Initial payload
+ * @return null|string
+ */
+ public function createFile($name, $data = null) {
+
+ if (is_resource($data)) {
+ $data = stream_get_contents($data);
+ }
+ $this->children[$name] = $data;
+ return '"' . md5($data) . '"';
+
+ }
+
+ /**
+ * Creates a new subdirectory
+ *
+ * @param string $name
+ * @return void
+ */
+ public function createDirectory($name) {
+
+ $this->children[$name] = array();
+
+ }
+
+ /**
+ * Returns an array with all the child nodes
+ *
+ * @return Sabre_DAV_INode[]
+ */
+ public function getChildren() {
+
+ $result = array();
+ foreach($this->children as $key=>$value) {
+
+ if ($value instanceof Sabre_DAV_INode) {
+ $result[] = $value;
+ } elseif (is_array($value)) {
+ $result[] = new Sabre_DAV_Mock_Collection($key, $value);
+ } else {
+ $result[] = new Sabre_DAV_Mock_File($key, $value);
+ }
+
+ }
+
+ return $result;
+
+ }
+
+}
diff --git a/tests/Sabre/DAV/Mock/File.php b/tests/Sabre/DAV/Mock/File.php
new file mode 100644
index 0000000..c0927a0
--- /dev/null
+++ b/tests/Sabre/DAV/Mock/File.php
@@ -0,0 +1,113 @@
+<?php
+
+/**
+ * Mock File
+ *
+ * See the Collection in this directory for more details.
+ *
+ * @copyright Copyright (C) 2007-2014 fruux GmbH. All rights reserved.
+ * @author Evert Pot (http://evertpot.com/)
+ * @license http://sabre.io/license/ Modified BSD License
+ */
+class Sabre_DAV_Mock_File extends Sabre_DAV_File {
+
+ protected $name;
+ protected $contents;
+
+ /**
+ * Creates the object
+ *
+ * @param string $name
+ * @param array $children
+ * @return void
+ */
+ public function __construct($name, $contents) {
+
+ $this->name = $name;
+ $this->put($contents);
+
+ }
+
+ /**
+ * Returns the name of the node.
+ *
+ * This is used to generate the url.
+ *
+ * @return string
+ */
+ public function getName() {
+
+ return $this->name;
+
+ }
+
+ /**
+ * Updates the data
+ *
+ * The data argument is a readable stream resource.
+ *
+ * After a succesful put operation, you may choose to return an ETag. The
+ * etag must always be surrounded by double-quotes. These quotes must
+ * appear in the actual string you're returning.
+ *
+ * Clients may use the ETag from a PUT request to later on make sure that
+ * when they update the file, the contents haven't changed in the mean
+ * time.
+ *
+ * If you don't plan to store the file byte-by-byte, and you return a
+ * different object on a subsequent GET you are strongly recommended to not
+ * return an ETag, and just return null.
+ *
+ * @param resource $data
+ * @return string|null
+ */
+ public function put($data) {
+
+ if (is_resource($data)) {
+ $data = stream_get_contents($data);
+ }
+ $this->contents = $data;
+ return '"' . md5($data) . '"';
+
+ }
+
+ /**
+ * Returns the data
+ *
+ * This method may either return a string or a readable stream resource
+ *
+ * @return mixed
+ */
+ public function get() {
+
+ return $this->contents;
+
+ }
+
+ /**
+ * Returns the ETag for a file
+ *
+ * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change.
+ *
+ * Return null if the ETag can not effectively be determined
+ *
+ * @return void
+ */
+ public function getETag() {
+
+ return '"' . md5($this->contents) . '"';
+
+ }
+
+ /**
+ * Returns the size of the node, in bytes
+ *
+ * @return int
+ */
+ public function getSize() {
+
+ return strlen($this->contents);
+
+ }
+
+}
diff --git a/tests/Sabre/DAV/ServerFinderBlockTest.php b/tests/Sabre/DAV/ServerFinderBlockTest.php
deleted file mode 100644
index 622e6b6..0000000
--- a/tests/Sabre/DAV/ServerFinderBlockTest.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-require_once 'Sabre/HTTP/ResponseMock.php';
-require_once 'Sabre/DAV/AbstractServer.php';
-require_once 'Sabre/DAV/Exception.php';
-
-class Sabre_DAV_ServerFinderBlockTest extends Sabre_DAV_AbstractServer{
-
- function testPut() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testput.txt',
- 'REQUEST_METHOD' => 'PUT',
- 'HTTP_X_EXPECTED_ENTITY_LENGTH' => '20',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('Testing finder');
- $this->server->httpRequest = $request;
- $this->server->exec();
-
- $this->assertEquals('', $this->response->body);
- $this->assertEquals('HTTP/1.1 201 Created',$this->response->status);
- $this->assertEquals('0', $this->response->headers['Content-Length']);
-
- $this->assertEquals('Testing finder',file_get_contents(SABRE_TEMPDIR . '/testput.txt'));
-
- }
-
- function testPutFail() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testput.txt',
- 'REQUEST_METHOD' => 'PUT',
- 'HTTP_X_EXPECTED_ENTITY_LENGTH' => '20',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('');
- $this->server->httpRequest = $request;
- $this->server->exec();
-
- $this->assertEquals('HTTP/1.1 403 Forbidden',$this->response->status);
- $this->assertEquals(array(
- 'Content-Type' => 'application/xml; charset=utf-8',
- ),$this->response->headers);
-
- $this->assertFalse(file_exists(SABRE_TEMPDIR . '/testput.txt'));
- }
-}
diff --git a/tests/Sabre/DAV/ServerSimpleTest.php b/tests/Sabre/DAV/ServerSimpleTest.php
index a50acec..6dada01 100644
--- a/tests/Sabre/DAV/ServerSimpleTest.php
+++ b/tests/Sabre/DAV/ServerSimpleTest.php
@@ -171,104 +171,6 @@ class Sabre_DAV_ServerSimpleTest extends Sabre_DAV_AbstractServer{
}
- function testPut() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testput.txt',
- 'REQUEST_METHOD' => 'PUT',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('Testing new file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('', $this->response->body);
- $this->assertEquals('HTTP/1.1 201 Created',$this->response->status);
- $this->assertEquals(array(
- "Content-Length" => "0",
- ), $this->response->headers);
-
- $this->assertEquals('Testing new file',file_get_contents($this->tempDir . '/testput.txt'));
-
- }
-
- function testPutAlreadyExists() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt',
- 'REQUEST_METHOD' => 'PUT',
- 'HTTP_IF_NONE_MATCH' => '*',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('Testing new file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals(array(
- 'Content-Type' => 'application/xml; charset=utf-8',
- ),$this->response->headers);
-
- $this->assertEquals('HTTP/1.1 412 Precondition failed',$this->response->status);
- $this->assertNotEquals('Testing new file',file_get_contents($this->tempDir . '/test.txt'));
-
- }
-
- function testPutUpdate() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt',
- 'REQUEST_METHOD' => 'PUT',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('Testing updated file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('0', $this->response->headers['Content-Length']);
-
- $this->assertEquals('HTTP/1.1 204 No Content',$this->response->status);
- $this->assertEquals('', $this->response->body);
- $this->assertEquals('Testing updated file',file_get_contents($this->tempDir . '/test.txt'));
-
- }
-
- function testPutNoParentCollection() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/test.txt/item.txt',
- 'REQUEST_METHOD' => 'PUT',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('Testing updated file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('HTTP/1.1 409 Conflict',$this->response->status);
-
- }
-
- function testPutContentRange() {
-
- $serverVars = array(
- 'REQUEST_URI' => '/testput.txt',
- 'REQUEST_METHOD' => 'PUT',
- 'HTTP_CONTENT_RANGE' => 'bytes/100-200',
- );
-
- $request = new Sabre_HTTP_Request($serverVars);
- $request->setBody('Testing new file');
- $this->server->httpRequest = ($request);
- $this->server->exec();
-
- $this->assertEquals('HTTP/1.1 501 Not Implemented',$this->response->status);
-
- }
-
-
function testDelete() {
$serverVars = array(
diff --git a/tests/Sabre/DAVServerTest.php b/tests/Sabre/DAVServerTest.php
index 24328f4..fb76f78 100644
--- a/tests/Sabre/DAVServerTest.php
+++ b/tests/Sabre/DAVServerTest.php
@@ -1,10 +1,17 @@
<?php
require_once 'Sabre/HTTP/ResponseMock.php';
+
+require_once 'Sabre/DAV/Auth/MockBackend.php';
+require_once 'Sabre/DAV/Mock/File.php';
+require_once 'Sabre/DAV/Mock/Collection.php';
+
+require_once 'Sabre/DAVACL/MockPrincipalBackend.php';
+
require_once 'Sabre/CalDAV/Backend/Mock.php';
+
require_once 'Sabre/CardDAV/Backend/Mock.php';
-require_once 'Sabre/DAVACL/MockPrincipalBackend.php';
-require_once 'Sabre/DAV/Auth/MockBackend.php';
+
/**
* This class may be used as a basis for other webdav-related unittests.
--
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