Skip to content

[2.7] [FrameworkBundle] bugfix in configuration for assets #13701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function getConfigTreeBuilder()

// convert the old configuration to the new one
if (isset($v['assets'])) {
throw new LogicException('You cannot use assets settings under "templating.templating" and "assets" configurations in the same project.');
throw new \LogicException('You cannot use assets settings under "framework.templating" and "assets" configurations in the same project.');
}

$v['assets'] = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@ public function testInvalidValueTrustedProxies()
));
}

/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add @expectedExceptionMessage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakzal, done.

* @expectedExceptionMessage You cannot use assets settings under "framework.templating" and "assets" configurations in the same project.
*/
public function testInvalidValueAssets()
{
$processor = new Processor();
$configuration = new Configuration(true);
$processor->processConfiguration($configuration, array(
array(
'templating' => array(
'engines' => null,
'assets_base_urls' => '//example.com',
),
'assets' => null,
),
));
}

protected static function getBundleDefaultConfig()
{
return array(
Expand Down