Skip to content

Commit

Permalink
Allow tests to run with the newly enforced baseURL
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnieezell committed Dec 18, 2017
1 parent 7760ef4 commit fc8cdc8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/_support/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,19 @@
require COMPOSER_PATH;
}

// Load environment settings from .env files
// into $_SERVER and $_ENV
require BASEPATH . 'Config/DotEnv.php';

$env = new \CodeIgniter\Config\DotEnv(ROOTPATH);
$env->load();

// Set environment values that would otherwise stop the framework from functioning during tests.
if (! isset($_SERVER['app.baseURL']))
{
$_SERVER['app.baseURL'] = 'http://example.com';
}

/*
* ---------------------------------------------------------------
* GRAB OUR CODEIGNITER INSTANCE
Expand Down

0 comments on commit fc8cdc8

Please sign in to comment.