From 521f5342efb42b466873a1c40b37d9b606e02866 Mon Sep 17 00:00:00 2001 From: Swikriti Tripathi Date: Fri, 6 Aug 2021 12:13:11 +0545 Subject: [PATCH] Refactor public link overwrite function --- .../features/bootstrap/PublicWebDavContext.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/features/bootstrap/PublicWebDavContext.php b/tests/acceptance/features/bootstrap/PublicWebDavContext.php index d07440da5090..9c9551748ee7 100644 --- a/tests/acceptance/features/bootstrap/PublicWebDavContext.php +++ b/tests/acceptance/features/bootstrap/PublicWebDavContext.php @@ -548,25 +548,28 @@ public function thePublicHasUploadedFileWithPasswordAndContentUsingPublicWebDAVA /** * @param string $filename target file name * @param string $body content to upload + * @param string $publicWebDAVAPIVersion * * @return void */ - public function publiclyOverwritingContent($filename, $body = 'test') { - $this->publicUploadContent($filename, '', $body, false); + public function publiclyOverwritingContent($filename, $publicWebDAVAPIVersion, $body = 'test') { + $this->publicUploadContent($filename, '', $body, false, [], $publicWebDAVAPIVersion); } /** - * @When the public overwrites file :filename with content :body using the old WebDAV API + * @When /^the public overwrites file "([^"]*)" with content "([^"]*)" using the (old|new) WebDAV API$/ * * @param string $filename target file name * @param string $body content to upload + * @param string $publicWebDAVAPIVersion * * @return void */ - public function thePublicOverwritesFileWithContentUsingOldWebDavApi($filename, $body = 'test') { + public function thePublicOverwritesFileWithContentUsingWebDavApi($filename, $publicWebDAVAPIVersion, $body = 'test') { $this->publiclyOverwritingContent( $filename, - $body + $body, + $publicWebDAVAPIVersion ); }