Allow to configure the application kernel's debug setting
This commit is contained in:
@@ -75,3 +75,21 @@ Feature: Configuring application kernel
|
||||
"""
|
||||
When I run Behat
|
||||
Then it should pass
|
||||
|
||||
Scenario: Using configured debug setting
|
||||
Given a Behat configuration containing:
|
||||
"""
|
||||
default:
|
||||
extensions:
|
||||
FriendsOfBehat\SymfonyExtension:
|
||||
kernel:
|
||||
debug: false
|
||||
"""
|
||||
And a feature file containing:
|
||||
"""
|
||||
Feature:
|
||||
Scenario:
|
||||
And the application kernel should have debug disabled
|
||||
"""
|
||||
When I run Behat
|
||||
Then it should pass
|
||||
|
||||
@@ -58,6 +58,7 @@ final class SymfonyExtension implements Extension
|
||||
->scalarNode('path')->defaultNull()->end()
|
||||
->scalarNode('class')->defaultNull()->end()
|
||||
->scalarNode('environment')->defaultValue('test')->end()
|
||||
->booleanNode('debug')->defaultTrue()->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
@@ -100,7 +101,7 @@ final class SymfonyExtension implements Extension
|
||||
{
|
||||
$definition = new Definition($config['class'], [
|
||||
$config['environment'],
|
||||
true,
|
||||
$config['debug'],
|
||||
]);
|
||||
$definition->addMethodCall('boot');
|
||||
$definition->setPublic(true);
|
||||
|
||||
Reference in New Issue
Block a user