Skip to content

Commit

Permalink
minor #141 Adapt to the new structure (greg0ire)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.1.x-dev branch.

Discussion
----------

Adapt to the new structure

Use class detection to determine what the most sensible defaults are, so
that this extension requires even less configuration.
Fixes #140

Commits
-------

fd82f9e Adapt to the new structure
  • Loading branch information
sroze committed Jun 22, 2018
2 parents d7c8344 + fd82f9e commit 31258ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ configure Symfony2 kernel inside Behat to fulfil all your needs.
or a path relative to the Behat configuration file. Defaults to ``app/autoload.php``.
- ``path`` - defines the path to the kernel class file in order to instantiate it. It
can be an absolute path or a path relative to the Behat configuration file. Defaults
to ``app/AppKernel.php``.
- ``class`` - defines the name of the kernel class. Defaults to ``AppKernel``.
to ``app/AppKernel.php`` or ``src/Kernel.php``, whichever exists.
- ``class`` - defines the name of the kernel class. Defaults to
``AppKernel`` or ``App\Kernel``, whichever exists.
- ``env`` - defines the environment in which kernel should be instantiated and used
inside suite. Defaults to ``test``.
- ``debug`` - defines whether kernel should be instantiated with ``debug`` option
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ public function configure(ArrayNodeDefinition $builder)
->arrayNode('kernel')
->addDefaultsIfNotSet()
->children()
->scalarNode('bootstrap')->defaultValue(self::DEFAULT_KERNEL_BOOTSTRAP)->end()
->scalarNode('path')->defaultValue('app/AppKernel.php')->end()
->scalarNode('class')->defaultValue('AppKernel')->end()
->scalarNode('bootstrap')->defaultValue(class_exists('App\Kernel') ? null : self::DEFAULT_KERNEL_BOOTSTRAP)->end()
->scalarNode('path')->defaultValue(class_exists('App\Kernel') ? null : 'app/AppKernel.php')->end()
->scalarNode('class')->defaultValue(class_exists('App\Kernel') ? 'App\Kernel' : 'AppKernel')->end()
->scalarNode('env')->defaultValue('test')->end()
->booleanNode('debug')
->beforeNormalization()
Expand Down

0 comments on commit 31258ea

Please sign in to comment.