Skip to content

Commit

Permalink
Add PackageNameTest to ConfigurationTest also add in the changelog th…
Browse files Browse the repository at this point in the history
…e corresponding entry to this PR
  • Loading branch information
Anthony MARTIN committed Jan 28, 2019
1 parent 8913af4 commit 20e35d7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,35 @@ public function testAssetsCanBeEnabled()
$this->assertEquals($defaultConfig, $config['assets']);
}

/**
* @dataProvider provideValidAssetsPackageNameConfigurationTests
*/
public function testValidAssetsPackageNameConfiguration($packageName)
{
$processor = new Processor();
$configuration = new Configuration(true);
$config = $processor->processConfiguration($configuration, [
[
'assets' => [
'packages' => [
$packageName => [],
],
],
],
]);

$this->assertArrayHasKey($packageName, $config['assets']['packages']);
}

public function provideValidAssetsPackageNameConfigurationTests()
{
return [
['foobar'],
['foo-bar'],
['foo_bar'],
];
}

/**
* @dataProvider provideInvalidAssetConfigurationTests
*/
Expand Down

0 comments on commit 20e35d7

Please sign in to comment.