Last active
August 29, 2015 14:18
-
-
Save proshanto/5469831b41db9bd32fc7 to your computer and use it in GitHub Desktop.
Laravel 5 Codeception Acceptance Testing Environment Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 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