Skip to content

Commit

Permalink
Merge pull request #2676 from gmhenderson/2.1
Browse files Browse the repository at this point in the history
Allow Laravel5 application URL to be set through config
  • Loading branch information
janhenkgerritsen committed Jan 3, 2016
2 parents 84e1846 + d840645 commit cf809a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Codeception/Lib/Connector/Laravel5.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct($module)
$this->module = $module;
$this->initialize();

$components = parse_url($this->app['config']->get('app.url', 'http://localhost'));
$components = array_key_exists('url', $this->module->config) ? parse_url($this->module->config['url']) : parse_url($this->app['config']->get('app.url', 'http://localhost'));
$host = isset($components['host']) ? $components['host'] : 'localhost';

parent::__construct($this->app, ['HTTP_HOST' => $host]);
Expand Down
1 change: 1 addition & 0 deletions src/Codeception/Module/Laravel5.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* * packages: `string`, default `workbench` - Root path of application packages (if any).
* * disable_middleware: `boolean`, default `false` - disable all middleware.
* * disable_events: `boolean`, default `false` - disable all events.
* * url: `string`, default `` - The application URL.
*
* ## API
*
Expand Down

0 comments on commit cf809a2

Please sign in to comment.