mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Log user constants during CI for debugging improvements
This commit is contained in:
parent
376294f354
commit
2c34af72e1
@ -78,6 +78,9 @@ before_script:
|
||||
# Bootstrap dependencies
|
||||
- if [[ $PHPUNIT_TEST == cms ]] || [[ $BEHAT_TEST == cms ]]; then php ./cms/tests/bootstrap/mysite.php; fi
|
||||
|
||||
# Log constants to CI for debugging purposes
|
||||
- php ./tests/dump_constants.php
|
||||
|
||||
# Start behat services
|
||||
- if [[ $BEHAT_TEST ]]; then echo 'SS_BASE_URL=http://localhost:8080/' >> .env; fi
|
||||
- if [[ $BEHAT_TEST ]]; then mkdir artifacts; fi
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
use Dotenv\Exception\InvalidPathException;
|
||||
use SilverStripe\Control\Util\IPUtils;
|
||||
use SilverStripe\Core\TempFolder;
|
||||
|
||||
/**
|
||||
@ -18,14 +17,14 @@ use SilverStripe\Core\TempFolder;
|
||||
* See Director::baseFolder(). Can be overwritten by Config::modify()->set(Director::class, 'alternate_base_folder', ).
|
||||
* - TEMP_FOLDER: Absolute path to temporary folder, used for manifest and template caches. Example: "/var/tmp"
|
||||
* See getTempFolder(). No trailing slash.
|
||||
* - ASSETS_DIR: Dir for assets folder. e.g. "assets"
|
||||
* - ASSETS_PATH: Full path to assets folder. e.g. "/var/www/my-webroot/assets"
|
||||
* - THEMES_DIR: Path relative to webroot, e.g. "themes"
|
||||
* - THEMES_PATH: Absolute filepath, e.g. "/var/www/my-webroot/themes"
|
||||
* - FRAMEWORK_DIR: Path relative to webroot, e.g. "framework"
|
||||
* - FRAMEWORK_PATH:Absolute filepath, e.g. "/var/www/my-webroot/framework"
|
||||
* - THIRDPARTY_DIR: Path relative to webroot, e.g. "framework/thirdparty"
|
||||
* - THIRDPARTY_PATH: Absolute filepath, e.g. "/var/www/my-webroot/framework/thirdparty"
|
||||
* - TRUSTED_PROXY: true or false, depending on whether the X-Forwarded-* HTTP
|
||||
* headers from the given client are trustworthy (e.g. from a reverse proxy).
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/functions.php';
|
||||
|
11
tests/dump_constants.php
Normal file
11
tests/dump_constants.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
// Helper for dumping the value of standard constants prior to test
|
||||
require __DIR__ . '/../src/includes/autoload.php';
|
||||
|
||||
echo "=== User-Defined Constants ===\n";
|
||||
$constants = get_defined_constants(true);
|
||||
foreach ($constants['user'] as $name => $value) {
|
||||
echo " - {$name}: '{$value}'\n";
|
||||
}
|
||||
echo "==============================\n";
|
Loading…
Reference in New Issue
Block a user