Skip to content

Instantly share code, notes, and snippets.

@proshanto
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save proshanto/5469831b41db9bd32fc7 to your computer and use it in GitHub Desktop.

Select an option

Save proshanto/5469831b41db9bd32fc7 to your computer and use it in GitHub Desktop.
Laravel 5 Codeception Acceptance Testing Environment Setup
/*
* file: bootstrap/app.php
*
* Set up environment 'testing' for codeception acceptance test
* https://laracasts.com/discuss/channels/general-discussion/acceptance-tests-while-setting-the-environment-name
* Main domain name is used-books.dev
*/
$app->detectEnvironment(function()
{
if (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == 'test.used-books.dev')
{
$app->loadEnvironmentFrom('.env.testing');
}
});
/*
* Entry in your host file will look like this
*
* 192.168.10.10 used-books.dev
* 192.168.10.10 test.used-books.dev
*/
/*
* Edit nginx file /etc/nginx/sites-available/used-books.dev
* server_name used-books.dev test.used-books.dev;
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment