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 30b6a4f commit 5c58b6e
Showing 1 changed file with 29 additions and 0 deletions.
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 5c58b6e

Please sign in to comment.