summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/WebDav.php
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r--build/integration/features/bootstrap/WebDav.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 49cd565cf26..58fdfed1711 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -9,8 +9,7 @@ use Sabre\DAV\Client as SClient;
require __DIR__ . '/../../vendor/autoload.php';
-trait WebDav{
-
+trait WebDav {
/** @var string*/
private $davPath = "remote.php/webdav";
@@ -163,6 +162,18 @@ trait WebDav{
}
/**
+ * @When User :user deletes file :file
+ */
+ public function userDeletesFile($user, $file) {
+ try {
+ $this->response = $this->makeDavRequest($user, 'DELETE', $file, []);
+ } catch (\GuzzleHttp\Exception\ServerException $e) {
+ // 4xx and 5xx responses cause an exception
+ $this->response = $e->getResponse();
+ }
+ }
+
+ /**
* @Given User :user created a folder :destination
*/
public function userCreatedAFolder($user, $destination){