summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-03-24 14:01:47 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-03-24 14:01:47 +0100
commit92791bb8ba5192c4bf84d8c1756aa5b2463d14a4 (patch)
tree4afd2c186d4dbf269f13ce28bf1e64815ef23a6e /tests
parent5e71d1558a100dcfad1267464fa729eaf98f81b1 (diff)
parenteb894e662523709b2b3915b14354aa6adab03c86 (diff)
downloadnextcloud-server-92791bb8ba5192c4bf84d8c1756aa5b2463d14a4.tar.gz
nextcloud-server-92791bb8ba5192c4bf84d8c1756aa5b2463d14a4.zip
Merge pull request #15126 from owncloud/sabre-storagenotavailable
Soft fail in CustomPropertiesBackend whenever storage not available
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/connector/sabre/custompropertiesbackend.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/lib/connector/sabre/custompropertiesbackend.php b/tests/lib/connector/sabre/custompropertiesbackend.php
index 8b6d1a90db1..212bece9402 100644
--- a/tests/lib/connector/sabre/custompropertiesbackend.php
+++ b/tests/lib/connector/sabre/custompropertiesbackend.php
@@ -105,11 +105,16 @@ class CustomPropertiesBackend extends \Test\TestCase {
* Test that propFind on a missing file soft fails
*/
public function testPropFindMissingFileSoftFail() {
- $this->tree->expects($this->any())
+ $this->tree->expects($this->at(0))
->method('getNodeForPath')
->with('/dummypath')
->will($this->throwException(new \Sabre\DAV\Exception\NotFound()));
+ $this->tree->expects($this->at(1))
+ ->method('getNodeForPath')
+ ->with('/dummypath')
+ ->will($this->throwException(new \Sabre\DAV\Exception\ServiceUnavailable()));
+
$propFind = new \Sabre\DAV\PropFind(
'/dummypath',
array(
@@ -125,6 +130,11 @@ class CustomPropertiesBackend extends \Test\TestCase {
$propFind
);
+ $this->plugin->propFind(
+ '/dummypath',
+ $propFind
+ );
+
// no exception, soft fail
$this->assertTrue(true);
}