Description
Hello. The tests/bootstrap.php file sets 'App.fullBaseUrl' even if this is already set in config/app_local.php.
This was causing issues for me in tests which call shell commands, like sending an email or formatting a PDF. It seems like it would be preferable to only set this value when it is not already set.
So instead of line 35 being as so:
if (empty($_SERVER['HTTP_HOST'])) {
Configure::write('App.fullBaseUrl', 'http://localhost');
}
... it would first check for an existing value, as so:
if (empty($_SERVER['HTTP_HOST']) && !Configure::read('App.fullBaseUrl')) {
Configure::write('App.fullBaseUrl', 'http://localhost');
}
CakePHP Version
4.3.0
PHP Version
7.4
Description
Hello. The tests/bootstrap.php file sets 'App.fullBaseUrl' even if this is already set in config/app_local.php.
This was causing issues for me in tests which call shell commands, like sending an email or formatting a PDF. It seems like it would be preferable to only set this value when it is not already set.
So instead of line 35 being as so:
... it would first check for an existing value, as so:
CakePHP Version
4.3.0
PHP Version
7.4