summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/FederationContext.php
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2015-11-24 12:48:06 +0000
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-26 17:03:17 +0100
commit9d44576819911b7cf0761191135dbc4de7b617ec (patch)
tree1332338d1fdddd078bf54c2a877a4ae13e72f0ec /build/integration/features/bootstrap/FederationContext.php
parent8fe878afe9af165b98470a75203df2f1b32cb68f (diff)
downloadnextcloud-server-9d44576819911b7cf0761191135dbc4de7b617ec.tar.gz
nextcloud-server-9d44576819911b7cf0761191135dbc4de7b617ec.zip
Restructured FeatureContext to reuse some parts and run two servers in parallel
Diffstat (limited to 'build/integration/features/bootstrap/FederationContext.php')
-rw-r--r--build/integration/features/bootstrap/FederationContext.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php
new file mode 100644
index 00000000000..279b5206dee
--- /dev/null
+++ b/build/integration/features/bootstrap/FederationContext.php
@@ -0,0 +1,27 @@
+<?php
+
+use Behat\Behat\Context\Context;
+use Behat\Behat\Context\SnippetAcceptingContext;
+use GuzzleHttp\Client;
+use GuzzleHttp\Message\ResponseInterface;
+
+require __DIR__ . '/../../vendor/autoload.php';
+
+/**
+ * Federation context.
+ */
+class FederationContext implements Context, SnippetAcceptingContext {
+
+ use BasicStructure;
+ use Provisioning;
+ use Sharing;
+
+ /**
+ * @When /^User "([^"]*)" from server "([^"]*)" shares "([^"]*)" with user "([^"]*)" from server "([^"]*)"$/
+ */
+ public function federateSharing($userLocal, $serverLocal, $pathLocal, $userRemote, $serverRemote){
+ $shareWith = "$userRemote@" . substr($this->remoteBaseUrl, 0, -4);
+ $this->createShare($userLocal, $pathLocal, 6, $shareWith, null, null, null);
+ }
+
+}