summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/FederationContext.php
diff options
context:
space:
mode:
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);
+ }
+
+}