Use dist env file by default

This commit is contained in:
Mateusz Zalewski
2018-09-20 11:52:20 +02:00
parent 291530353b
commit de853c0fe3
3 changed files with 36 additions and 1 deletions

View File

@@ -89,3 +89,36 @@ Feature: Not crashing Behat
And a feature file with passing scenario
When I run Behat
Then it should pass
Scenario: This extension used dist file by default
Given a Behat configuration containing:
"""
default:
extensions:
FriendsOfBehat\SymfonyExtension:
env_file: .env_in_memory
kernel:
path: src/MyKernel.php
class: MyKernel
bootstrap: ~
"""
And a file ".env_in_memory.dist" containing:
"""
APP_ENV=dev
"""
And a file "src/MyKernel.php" containing:
"""
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class MyKernel extends Kernel
{
public function registerBundles() { return []; }
public function registerContainerConfiguration(LoaderInterface $loader) {}
}
"""
And a feature file with passing scenario
When I run Behat
Then it should pass