This repository was archived by the owner on May 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ default:
2424 framework_script : ../../framework/yii.php
2525 config_script : ../config/test.php
2626 mink_driver : true
27- wunit : ~
2827` ` `
2928
3029Installation
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function load(array $config, ContainerBuilder $container)
5757 }
5858 $ container ->setParameter ('behat.yii_extension.config_script ' , $ config ['config_script ' ]);
5959
60- if (isset ( $ config ['wunit ' ]) ) {
60+ if ($ config ['mink_driver ' ] ) {
6161 if (!class_exists ('Behat \\Mink \\Driver \\WUnitDriver ' )) {
6262 throw new \RuntimeException (
6363 'Install WUnitDriver in order to activate wunit session. '
@@ -75,6 +75,11 @@ public function load(array $config, ContainerBuilder $container)
7575 */
7676 public function getConfig (ArrayNodeDefinition $ builder )
7777 {
78+ $ boolFilter = function ($ v ) {
79+ $ filtered = filter_var ($ v , FILTER_VALIDATE_BOOLEAN , FILTER_NULL_ON_FAILURE );
80+ return (null === $ filtered ) ? $ v : $ filtered ;
81+ };
82+
7883 $ builder ->
7984 children ()->
8085 scalarNode ('framework_script ' )->
@@ -83,8 +88,11 @@ public function getConfig(ArrayNodeDefinition $builder)
8388 scalarNode ('config_script ' )->
8489 isRequired ()->
8590 end ()->
86- arrayNode ('wunit ' )->
87- canBeUnset ()->
91+ booleanNode ('mink_driver ' )->
92+ beforeNormalization ()->
93+ ifString ()->then ($ boolFilter )->
94+ end ()->
95+ defaultFalse ()->
8896 end ()->
8997 end ()
9098 ;
You can’t perform that action at this time.
0 commit comments