summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/CommandLineContext.php
diff options
context:
space:
mode:
authorSujith H <sharidasan@owncloud.com>2017-03-09 15:24:33 +0530
committerMorris Jobke <hey@morrisjobke.de>2017-03-20 18:29:21 -0600
commitf654f295329692f537462af51eaea7983af9fdb7 (patch)
treebe62cfdc98fec5c4c5ec480e5ad01ca96f9fcd38 /build/integration/features/bootstrap/CommandLineContext.php
parent3b07731099fb725df9e15ebd762a685f130114ad (diff)
downloadnextcloud-server-f654f295329692f537462af51eaea7983af9fdb7.tar.gz
nextcloud-server-f654f295329692f537462af51eaea7983af9fdb7.zip
Providing --path option to transfer-ownership
This will help user to selectively move the folders specified using --path option, instead of moving entire folder under files directory. Signed-off-by: Sujith H <sharidasan@owncloud.com> Update the integration test for transfer-ownership Update the integration test for transfer-ownership as the new option --path is introduced in the command. Signed-off-by: Sujith H <sharidasan@owncloud.com> Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'build/integration/features/bootstrap/CommandLineContext.php')
-rw-r--r--build/integration/features/bootstrap/CommandLineContext.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php
index 95f492a62db..c8253966cdb 100644
--- a/build/integration/features/bootstrap/CommandLineContext.php
+++ b/build/integration/features/bootstrap/CommandLineContext.php
@@ -89,6 +89,20 @@ class CommandLineContext implements \Behat\Behat\Context\Context {
}
/**
+ * @When /^transfering ownership of path "([^"]+)" from "([^"]+)" to "([^"]+)"/
+ */
+ public function transferingOwnershipPath($path, $user1, $user2) {
+ $path = '--path=' . $path;
+ if($this->runOcc(['files:transfer-ownership', $path, $user1, $user2]) === 0) {
+ $this->lastTransferPath = $this->findLastTransferFolderForUser($user1, $user2);
+ } else {
+ // failure
+ $this->lastTransferPath = null;
+ }
+ }
+
+
+ /**
* @When /^using received transfer folder of "([^"]+)" as dav path$/
*/
public function usingTransferFolderAsDavPath($user) {