|
@@ -96,6 +96,8 @@ abstract class FrameworkExtensionTest extends TestCase
|
|
|
|
|
|
$this->assertTrue($container->hasDefinition('templating.name_parser'), '->registerTemplatingConfiguration() loads templating.xml');
|
|
|
|
|
|
+ $this->assertEquals('request', $container->getDefinition('templating.helper.assets')->getScope(), '->registerTemplatingConfiguration() sets request scope on assets helper if one or more packages are request-scopes');
|
|
|
+
|
|
|
// default package should have one http base url and path package ssl url
|
|
|
$this->assertTrue($container->hasDefinition('templating.asset.default_package.http'));
|
|
|
$package = $container->getDefinition('templating.asset.default_package.http');
|
|
@@ -125,6 +127,13 @@ abstract class FrameworkExtensionTest extends TestCase
|
|
|
$this->assertEquals(array('FrameworkBundle:Form', 'theme1', 'theme2'), $container->getParameter('templating.helper.form.resources'), '->registerTemplatingConfiguration() registers the theme and adds the base theme');
|
|
|
}
|
|
|
|
|
|
+ public function testTemplatingAssetsHelperScopeDependsOnPackageArgumentScopes()
|
|
|
+ {
|
|
|
+ $container = $this->createContainerFromFile('templating_url_package');
|
|
|
+
|
|
|
+ $this->assertNotEquals('request', $container->getDefinition('templating.helper.assets')->getScope(), '->registerTemplatingConfiguration() does not set request scope on assets helper if no packages are request-scopes');
|
|
|
+ }
|
|
|
+
|
|
|
public function testTranslator()
|
|
|
{
|
|
|
$container = $this->createContainerFromFile('full');
|