mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2025-12-24 01:57:51 -05:00
Overwrite backupGlobals + base_url generation in testing mode
This commit is contained in:
@@ -22,6 +22,7 @@ COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
|
||||
RUN composer install -d/app
|
||||
RUN php /app/vendor/kenjis/ci-phpunit-test/install.php -a /app/application -p /app/vendor/codeigniter/framework
|
||||
RUN sed -i 's/backupGlobals="true"/backupGlobals="false"/g' /app/application/tests/phpunit.xml
|
||||
|
||||
WORKDIR /app/application/tests
|
||||
|
||||
|
||||
@@ -65,7 +65,9 @@ $config['db_log_enabled'] = FALSE;
|
||||
| a PHP script and you can easily do that on your own.
|
||||
|
|
||||
*/
|
||||
$config['base_url'] = '';
|
||||
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_ENV['FORCE_HTTPS']) && $_ENV['FORCE_HTTPS'] == 'true')) ? 'https' : 'http';
|
||||
$config['base_url'] .= '://' . (ENVIRONMENT == "testing") ? 'localhost' : $_SERVER['HTTP_HOST'] ;
|
||||
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user