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
209
209
$ this ->assertSame ($ expected , $ container ->resolveEnvPlaceholders ($ ext ->getConfig ()));
210
210
}
211
211
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
+
212
225
private function doProcess (ContainerBuilder $ container ): void
213
226
{
214
227
(new MergeExtensionConfigurationPass ())->process ($ container );
@@ -247,6 +260,7 @@ public function getConfigTreeBuilder()
247
260
->end ()
248
261
->arrayNode ('simple_array_node ' )->end ()
249
262
->enumNode ('enum_node ' )->values (array ('a ' , 'b ' ))->end ()
263
+ ->variableNode ('variable_node ' )->end ()
250
264
->end ();
251
265
252
266
return $ treeBuilder ;
You can’t perform that action at this time.
0 commit comments