File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,19 @@ public function testEmptyEnvWhichCannotBeEmptyForScalarNode(): void
209209 $ this ->assertSame ($ expected , $ container ->resolveEnvPlaceholders ($ ext ->getConfig ()));
210210 }
211211
212+ public function testEnvWithVariableNode (): void
213+ {
214+ $ container = new ContainerBuilder ();
215+ $ container ->registerExtension ($ ext = new EnvExtension ());
216+ $ container ->prependExtensionConfig ('env_extension ' , $ expected = array (
217+ 'variable_node ' => '%env(SOME)% ' ,
218+ ));
219+
220+ $ this ->doProcess ($ container );
221+
222+ $ this ->assertSame ($ expected , $ container ->resolveEnvPlaceholders ($ ext ->getConfig ()));
223+ }
224+
212225 private function doProcess (ContainerBuilder $ container ): void
213226 {
214227 (new MergeExtensionConfigurationPass ())->process ($ container );
@@ -247,6 +260,7 @@ public function getConfigTreeBuilder()
247260 ->end ()
248261 ->arrayNode ('simple_array_node ' )->end ()
249262 ->enumNode ('enum_node ' )->values (array ('a ' , 'b ' ))->end ()
263+ ->variableNode ('variable_node ' )->end ()
250264 ->end ();
251265
252266 return $ treeBuilder ;
You can’t perform that action at this time.
0 commit comments