aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php b/vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php
index d3932a4c6..543ec652a 100644
--- a/vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php
+++ b/vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php
@@ -241,7 +241,7 @@ class HttpPutTest extends DAVServerTest
*
* @depends testPut
*/
- public function testPutNoParent()
+ public function testPutParentIsNotCollection()
{
$request = new HTTP\Request(
'PUT',
@@ -255,6 +255,24 @@ class HttpPutTest extends DAVServerTest
}
/**
+ * PUT thats created in a non-existent collection should be rejected.
+ *
+ * @depends testPut
+ */
+ public function testPutParentCollectionDoesNotExist()
+ {
+ $request = new HTTP\Request(
+ 'PUT',
+ '/non-existent-collection/file2',
+ [],
+ 'hello'
+ );
+
+ $response = $this->request($request);
+ $this->assertEquals(409, $response->getStatus());
+ }
+
+ /**
* 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.