summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/CommandLineContext.php
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2020-09-18 18:32:59 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2020-09-18 18:54:55 +0200
commitf400c44e8b7acbdf3fb15ec3dee4153656d46b8d (patch)
tree55a00fba4621a1c026204b0ffa3d0f86d62fcc2b /build/integration/features/bootstrap/CommandLineContext.php
parent29fcaa1cec5a632dab830e00248fe5d1faf8b02c (diff)
downloadnextcloud-server-f400c44e8b7acbdf3fb15ec3dee4153656d46b8d.tar.gz
nextcloud-server-f400c44e8b7acbdf3fb15ec3dee4153656d46b8d.zip
Add integration tests for transferring files of a user with a risky name
The files:transfer-ownership performs a sanitization of users with "risky" display names (including characters like "\" or "/"). In order to allow (escaped) double quotes in the display name the regular expression used in the "user XXX with displayname YYY exists" step had to be adjusted. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/features/bootstrap/CommandLineContext.php')
-rw-r--r--build/integration/features/bootstrap/CommandLineContext.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php
index bf999fd2050..a689f0aab30 100644
--- a/build/integration/features/bootstrap/CommandLineContext.php
+++ b/build/integration/features/bootstrap/CommandLineContext.php
@@ -26,6 +26,7 @@
require __DIR__ . '/../../vendor/autoload.php';
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
+use PHPUnit\Framework\Assert;
class CommandLineContext implements \Behat\Behat\Context\Context {
use CommandLine;
@@ -128,4 +129,11 @@ class CommandLineContext implements \Behat\Behat\Context\Context {
$davPath = rtrim($davPath, '/') . $this->lastTransferPath;
$this->featureContext->usingDavPath($davPath);
}
+
+ /**
+ * @Then /^transfer folder name contains "([^"]+)"$/
+ */
+ public function transferFolderNameContains($text) {
+ Assert::assertContains($text, $this->lastTransferPath);
+ }
}