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

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolFi <wolfi@wolfi.es>2017-05-07 19:21:11 +0300
committerWolFi <wolfi@wolfi.es>2017-05-07 19:21:11 +0300
commitbb6c7a13b9d1b8e87dfc5a8f4495b9eb9319fa2c (patch)
tree246c44ac8eb6de674e6799c460f6f4350a60051c
parentc4f8439126ed7529432ac58d961666bcbaf761bc (diff)
PHPUnit fixes for custom locations
-rw-r--r--[-rwxr-xr-x]launch_phpunit.sh.sample (renamed from launch_phpunit.sh)4
-rw-r--r--tests/bootstrap.php12
2 files changed, 12 insertions, 4 deletions
diff --git a/launch_phpunit.sh b/launch_phpunit.sh.sample
index 70d80b58..949113d7 100755..100644
--- a/launch_phpunit.sh
+++ b/launch_phpunit.sh.sample
@@ -1,7 +1,7 @@
#!/bin/bash
# Setup your testing environment paths
-export SERVER_BASE_DIR=/var/www/html/nextcloud/
-export SERVER_CONFIG_DIR=/var/www/html/nextcloud/config/
+export SERVER_BASE_DIR=/var/www/html/
+export SERVER_CONFIG_DIR=/var/www/html/config/
export SERVER_CONFIG_FILE=config.php
# Launch the actual tests
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 5bee8f49..f9408862 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -9,9 +9,17 @@
* @copyright Sander Brand 2016
*/
-require_once __DIR__ . '/../../../tests/bootstrap.php';
+$nc_require_base = getenv('SERVER_BASE_DIR');
+
+if ($nc_require_base) {
+ require_once $nc_require_base . '/tests/bootstrap.php';
+}
+else{
+ require_once __DIR__ . '/../../../tests/bootstrap.php';
+}
+
require_once __DIR__ . '/../appinfo/autoload.php';
-#require_once __DIR__ . '/db/DatabaseHelperTest.php';
+require_once __DIR__ . '/db/DatabaseHelperTest.php';
// Fix for "Autoload path not allowed: .../tests/lib/testcase.php"