Skip to content

Commit

Permalink
Allow defining http host.
Browse files Browse the repository at this point in the history
  • Loading branch information
guncha25 committed Aug 3, 2020
1 parent a3f7d6d commit 8205ecb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Codeception/Module/DrupalBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* - DrupalBootstrap:
* root: './web'
* site_path: 'sites/default'
* http_host: 'mysite.local'
*
* @package Codeception\Module
*/
Expand Down Expand Up @@ -63,6 +64,9 @@ public function __construct(ModuleContainer $container, $config = NULL) {
}
}
chdir($this->_getConfig('root'));
if (isset($this->config['http_host'])) {
$_SERVER['HTTP_HOST'] = $this->config['http_host'];
}
$request = Request::createFromGlobals();
$autoloader = require $this->_getConfig('root') . '/autoload.php';
$kernel = new TestDrupalKernel('prod', $autoloader, $this->_getConfig('root'));
Expand Down

0 comments on commit 8205ecb

Please sign in to comment.