Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/updater.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/features/bootstrap/FeatureContext.php')
-rw-r--r--tests/features/bootstrap/FeatureContext.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/features/bootstrap/FeatureContext.php b/tests/features/bootstrap/FeatureContext.php
index 7d8ef5a..2511f23 100644
--- a/tests/features/bootstrap/FeatureContext.php
+++ b/tests/features/bootstrap/FeatureContext.php
@@ -423,4 +423,38 @@ jFSE6+KKI+HAE132eaXY5A==',
$content = preg_replace("!'version'\s*=>\s*'(\d+\.\d+\.\d+)\.\d+!", "'version' => '$1", $content);
file_put_contents($configFile, $content);
}
+
+ /**
+ * @Given there is a folder called :name
+ */
+ public function thereIsAFolderCalled($name)
+ {
+ mkdir($this->serverDir . 'nextcloud/' . $name);
+ }
+
+ /**
+ * @Given there is a config for a secondary apps directory called :name
+ */
+ public function thereIsAConfigForASecondaryAppsDirectoryCalled($name)
+ {
+ $configFile = $this->serverDir . 'nextcloud/config/config.php';
+ $content = file_get_contents($configFile);
+ $appsPaths = <<<EOF
+ 'apps_paths' => [
+ [
+ 'path'=> dirname(__DIR__) . '/apps',
+ 'url' => '/apps',
+ 'writable' => true,
+ ],
+ [
+ 'path'=> dirname(__DIR__) . '/%s',
+ 'url' => '/%s',
+ 'writable' => true,
+ ],
+ ],
+EOF;
+ $appsPaths = sprintf($appsPaths, $name, $name);
+ $content = preg_replace("!\);!", $appsPaths . ');', $content);
+ file_put_contents($configFile, $content);
+ }
}