aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/BasicStructure.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-03-14 10:51:52 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2016-03-14 10:55:52 +0100
commitf62a7b2447cc41871a9f97eedae2dfac2b0139ca (patch)
tree3ee3dc7ae190d9d04059ce3d2460042c875d2206 /build/integration/features/bootstrap/BasicStructure.php
parente0998c27ff205566db7799dce177192d2b776bc1 (diff)
downloadnextcloud-server-f62a7b2447cc41871a9f97eedae2dfac2b0139ca.tar.gz
nextcloud-server-f62a7b2447cc41871a9f97eedae2dfac2b0139ca.zip
Only match LOCAL and REMOTE as servers, correctly make use of the sharer server from the command
Diffstat (limited to 'build/integration/features/bootstrap/BasicStructure.php')
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php
index 4ff7403bb16..d2aed82055a 100644
--- a/build/integration/features/bootstrap/BasicStructure.php
+++ b/build/integration/features/bootstrap/BasicStructure.php
@@ -69,18 +69,20 @@ trait BasicStructure {
}
/**
- * @Given /^Using server "([^"]*)"$/
+ * @Given /^Using server "(LOCAL|REMOTE)"$/
* @param string $server
+ * @return string Previous used server
*/
public function usingServer($server) {
+ $previousServer = $this->currentServer;
if ($server === 'LOCAL'){
$this->baseUrl = $this->localBaseUrl;
$this->currentServer = 'LOCAL';
- } elseif ($server === 'REMOTE'){
+ return $previousServer;
+ } else {
$this->baseUrl = $this->remoteBaseUrl;
$this->currentServer = 'REMOTE';
- } else{
- PHPUnit_Framework_Assert::fail("Server can only be LOCAL or REMOTE");
+ return $previousServer;
}
}