summaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/FederationContext.php
blob: 279b5206deead5b839cd3c2ec4ee4a226ae5844f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
	}

}