Skip to content

Commit 5cbc8d0

Browse files
author
Anthony MARTIN
committed
Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
1 parent 035c434 commit 5cbc8d0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

+29
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,35 @@ public function testAssetsCanBeEnabled()
101101
$this->assertEquals($defaultConfig, $config['assets']);
102102
}
103103

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+
104133
/**
105134
* @dataProvider provideInvalidAssetConfigurationTests
106135
*/

0 commit comments

Comments
 (0)