aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-13 09:50:53 +0000
committerMario <mario@mariovavti.com>2021-01-13 09:50:53 +0000
commit5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a (patch)
tree7521f4800e393538d19c393c6f495ea2d41cbf5a /vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php
parent0bc4c7d1a0e4348018e533be600ad1c648fd97fb (diff)
parent4d2bcbc5837a7d99dc541595ca8087c335242af0 (diff)
downloadvolse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.tar.gz
volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.tar.bz2
volse-hubzilla-5eefdc6485b2f6082f6fe5dfd6f1731fae7e3a2a.zip
Merge branch '5.2RC'5.2
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/HttpPutTest.php')
-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.