summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-03-18 12:30:23 +0100
committerVincent Petry <pvince81@owncloud.com>2015-03-18 12:36:37 +0100
commit50194c31b42399cd27d178cccfc58a21f57f778c (patch)
tree45d92061b48d73ad1d1b0a573f51cd1a5b8ec6d7 /tests
parent093efa458c16ea4a7f7fcaf3f98e1e0fb96624c4 (diff)
downloadnextcloud-server-50194c31b42399cd27d178cccfc58a21f57f778c.tar.gz
nextcloud-server-50194c31b42399cd27d178cccfc58a21f57f778c.zip
Soft fail in custom properties backend
This makes it possible for clients to still receive a file list (minus the broken files) instead of getting no list at all
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/connector/sabre/custompropertiesbackend.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lib/connector/sabre/custompropertiesbackend.php b/tests/lib/connector/sabre/custompropertiesbackend.php
index ee0c3c4e53d..8b6d1a90db1 100644
--- a/tests/lib/connector/sabre/custompropertiesbackend.php
+++ b/tests/lib/connector/sabre/custompropertiesbackend.php
@@ -102,6 +102,34 @@ class CustomPropertiesBackend extends \Test\TestCase {
}
/**
+ * Test that propFind on a missing file soft fails
+ */
+ public function testPropFindMissingFileSoftFail() {
+ $this->tree->expects($this->any())
+ ->method('getNodeForPath')
+ ->with('/dummypath')
+ ->will($this->throwException(new \Sabre\DAV\Exception\NotFound()));
+
+ $propFind = new \Sabre\DAV\PropFind(
+ '/dummypath',
+ array(
+ 'customprop',
+ 'customprop2',
+ 'unsetprop',
+ ),
+ 0
+ );
+
+ $this->plugin->propFind(
+ '/dummypath',
+ $propFind
+ );
+
+ // no exception, soft fail
+ $this->assertTrue(true);
+ }
+
+ /**
* Test setting/getting properties
*/
public function testSetGetPropertiesForFile() {