-
Notifications
You must be signed in to change notification settings - Fork 35
Is there any opportunity to set env variable in php process? #30
Copy link
Copy link
Open
Description
Ok, I need to set environment variable for php process while starting built-in server. This is necessary in order to switch to testing database.
My application config file looks like this:
$connection = [
'database' => getenv('DATABASE_NAME') ?: 'default-name',
];So all I need is to set DATABASE_NAME variable before starting php -S process. Is there any opportunity to achieve this? Here it is my codeception.yml:
extensions:
config:
Codeception\Extension\PhpBuiltinServer:
hostname: localhost
port: 8000
autostart: true
documentRoot: web
startDelay: 1
phpIni: /etc/php5/apache2/php.ini
router: web/index.php
directoryIndex: index.phpReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels