File tree 1 file changed +29
-0
lines changed
src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,35 @@ public function testAssetsCanBeEnabled()
101
101
$ this ->assertEquals ($ defaultConfig , $ config ['assets ' ]);
102
102
}
103
103
104
+ /**
105
+ * @dataProvider provideValidAssetsPackageNameConfigurationTests
106
+ */
107
+ public function testValidAssetsPackageNameConfiguration ($ packageName )
108
+ {
109
+ $ processor = new Processor ();
110
+ $ configuration = new Configuration (true );
111
+ $ config = $ processor ->processConfiguration ($ configuration , [
112
+ [
113
+ 'assets ' => [
114
+ 'packages ' => [
115
+ $ packageName => [],
116
+ ],
117
+ ],
118
+ ],
119
+ ]);
120
+
121
+ $ this ->assertArrayHasKey ($ packageName , $ config ['assets ' ]['packages ' ]);
122
+ }
123
+
124
+ public function provideValidAssetsPackageNameConfigurationTests ()
125
+ {
126
+ return [
127
+ ['foobar ' ],
128
+ ['foo-bar ' ],
129
+ ['foo_bar ' ],
130
+ ];
131
+ }
132
+
104
133
/**
105
134
* @dataProvider provideInvalidAssetConfigurationTests
106
135
*/
You can’t perform that action at this time.
0 commit comments