diff options
Diffstat (limited to 'build/integration/features/bootstrap/FeatureContext.php')
-rw-r--r-- | build/integration/features/bootstrap/FeatureContext.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php index 3a4b619fe7a..b3d928bb21d 100644 --- a/build/integration/features/bootstrap/FeatureContext.php +++ b/build/integration/features/bootstrap/FeatureContext.php @@ -27,6 +27,9 @@ class FeatureContext implements Context, SnippetAcceptingContext { /** @var int */ private $sharingApiVersion = 1; + /** @var string*/ + private $davPath = "remote.php/webdav"; + /** @var SimpleXMLElement */ private $lastShareData = null; @@ -212,6 +215,13 @@ class FeatureContext implements Context, SnippetAcceptingContext { } /** + * @Given /^using dav path "([^"]*)"$/ + */ + public function usingDavPath($davPath) { + $this->davPath = $davPath; + } + + /** * @Given /^user "([^"]*)" exists$/ */ public function assureUserExists($user) { @@ -906,7 +916,7 @@ class FeatureContext implements Context, SnippetAcceptingContext { } public function makeDavRequest($user, $method, $path, $headers){ - $fullUrl = substr($this->baseUrl, 0, -4) . "remote.php/webdav" . "$path"; + $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path"; $client = new Client(); $options = []; if ($user === 'admin') { @@ -926,7 +936,7 @@ class FeatureContext implements Context, SnippetAcceptingContext { * @Given /^User "([^"]*)" moved file "([^"]*)" to "([^"]*)"$/ */ public function userMovedFile($user, $fileSource, $fileDestination){ - $fullUrl = substr($this->baseUrl, 0, -4) . "remote.php/webdav"; + $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath; $headers['Destination'] = $fullUrl . $fileDestination; $this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers); PHPUnit_Framework_Assert::assertEquals(201, $this->response->getStatusCode()); @@ -936,7 +946,7 @@ class FeatureContext implements Context, SnippetAcceptingContext { * @When /^User "([^"]*)" moves file "([^"]*)" to "([^"]*)"$/ */ public function userMovesFile($user, $fileSource, $fileDestination){ - $fullUrl = substr($this->baseUrl, 0, -4) . "remote.php/webdav"; + $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath; $headers['Destination'] = $fullUrl . $fileDestination; $this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers); } |