Skip to content

Commit 8205ecb

Browse files
committed
Allow defining http host.
1 parent a3f7d6d commit 8205ecb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Codeception/Module/DrupalBootstrap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* - DrupalBootstrap:
2121
* root: './web'
2222
* site_path: 'sites/default'
23+
* http_host: 'mysite.local'
2324
*
2425
* @package Codeception\Module
2526
*/
@@ -63,6 +64,9 @@ public function __construct(ModuleContainer $container, $config = NULL) {
6364
}
6465
}
6566
chdir($this->_getConfig('root'));
67+
if (isset($this->config['http_host'])) {
68+
$_SERVER['HTTP_HOST'] = $this->config['http_host'];
69+
}
6670
$request = Request::createFromGlobals();
6771
$autoloader = require $this->_getConfig('root') . '/autoload.php';
6872
$kernel = new TestDrupalKernel('prod', $autoloader, $this->_getConfig('root'));

0 commit comments

Comments
 (0)