title: Laravel 5.2: Setup APP_ENV for testing
body: <p>For testing I need to use another database than in a <code>local</code> environment.</p>
  
  <p>I use homestead and Laravel 5.2 + Behat3 + Mink in my development flow.</p>
  
  <p>When I run behat from host machine than it's OK - variable is setting up to <code>APP_ENV=testing</code>.</p>
  
  <p>But I have a trouble with setting <code>testing</code> environment when do the same inside homestead machine: the <code>APP_ENV</code> is always <code>local</code>.</p>
  
  <ol>
  <li><p>For testing environment (<code>APP_ENV</code>) I modified standard <code>welcome.blade.php</code> next way:</p>
  
  <pre><code>- &lt;div class="title"&gt;Laravel 5&lt;/div&gt;
  + &lt;div class="title"&gt;Laravel 5 ({!! app()-&gt;environment() !!})&lt;/div&gt;
  </code></pre></li>
  <li><p>I've configured <code>behat.yml</code>:</p>
  
  <pre><code>default:
      extensions:
          Laracasts\Behat:
              env_path: .env.behat
          Behat\MinkExtension:
              default_session: laravel
              laravel: ~
  </code></pre></li>
  <li><p>My testing environment variables in <code>.env.behat</code>:</p>
  
  <pre><code>APP_ENV=testing
  APP_DEBUG=true
  DB_CONNECTION=sqlite
  </code></pre></li>
  <li><p>I made my home.feature:</p>
  
  <pre><code>Feature: Check home page
    In order to verify home page
    As a user
    I need to see text Laravel and an environment name
  
    @home
    Scenario: Home Page
      Given I am on the homepage
      Then I should see "Laravel 5 (testing)"
  </code></pre></li>
  </ol>
  
  <p>So when I run behat I see <code>Laravel 5 (local)</code> but not a <code>Laravel 5 (testing)</code> text:</p>
  
  <pre><code>    Feature: Check home page
        In order to verify home page
        As a user
        I need to see Laravel text
  
        @home
        Scenario: Home Page                       # features/home.feature:7
          Given I am on the homepage              # FeatureContext::iAmOnHomepage()
          Then I should see "Laravel 5 (testing)" # FeatureContext::assertPageContainsText()
            The text "Laravel 5 (testing)" was not found anywhere in the text of the current page. (Behat\Mink\Exception\ResponseTextException)
  
      --- Failed scenarios:
  
          features/home.feature:7
  
      1 scenario (1 failed)
  </code></pre>
  
  <p>What I missed in configuration or what I should know about custom setup Laravel configuration?</p>