Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5c58b6e

Browse filesBrowse files
author
Anthony MARTIN
committed
Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
1 parent 30b6a4f commit 5c58b6e
Copy full SHA for 5c58b6e

File tree

Expand file treeCollapse file tree

1 file changed

+29
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+29
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,35 @@ public function testAssetsCanBeEnabled()
211211
$this->assertEquals($defaultConfig, $config['assets']);
212212
}
213213

214+
/**
215+
* @dataProvider provideValidAssetsPackageNameConfigurationTests
216+
*/
217+
public function testValidAssetsPackageNameConfiguration($packageName)
218+
{
219+
$processor = new Processor();
220+
$configuration = new Configuration(true);
221+
$config = $processor->processConfiguration($configuration, [
222+
[
223+
'assets' => [
224+
'packages' => [
225+
$packageName => [],
226+
],
227+
],
228+
],
229+
]);
230+
231+
$this->assertArrayHasKey($packageName, $config['assets']['packages']);
232+
}
233+
234+
public function provideValidAssetsPackageNameConfigurationTests()
235+
{
236+
return [
237+
['foobar'],
238+
['foo-bar'],
239+
['foo_bar'],
240+
];
241+
}
242+
214243
/**
215244
* @dataProvider provideInvalidAssetConfigurationTests
216245
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.