Skip to content

Commit

Permalink
PHPUnit fixes for custom locations
Browse files Browse the repository at this point in the history
  • Loading branch information
animalillo committed May 7, 2017
1 parent c4f8439 commit bb6c7a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions launch_phpunit.sh → launch_phpunit.sh.sample
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 10 additions & 2 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bb6c7a1

Please sign in to comment.