1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

APP_PATH is now customizable in config.yml

Configuration option is "app_path" (string)
This commit is contained in:
Deltik
2018-02-16 17:32:07 -06:00
parent a26721aff1
commit e485b16d65
3 changed files with 14 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
---
# Path (absolute or relative) to the app intended to be tested
# Absolute path begins with "/"; relative path does not begin with "/"
app_path: 'e107/'
# Configure this section for automated test deployments to cPanel
cpanel:
@@ -22,8 +26,6 @@ manual:
# URL to the app that you deployed manually; needed for acceptance tests
url: 'http://set-this-if-running-acceptance-tests-manually.local'
dir: '/e107'
# Only MySQL/MariaDB is supported
db:
# Hostname or IP address; use 'localhost' for a local server

2
e107

Submodule e107 updated: fd7b9e352e...7ffb60c60b

View File

@@ -1,3 +1,11 @@
<?php
define('APP_PATH', realpath(codecept_root_dir()."/e107")); // TODO use 'dir' value from config.yml
$params = include(codecept_root_dir()."/lib/config.php");
$app_path = $params['app_path'] ?: codecept_root_dir()."/e107";
// Relative path
if (substr($app_path, 0, 1) !== '/')
$app_path = codecept_root_dir() . "/${app_path}";
define('APP_PATH', realpath($app_path));