Merge branch '3.3' into 3.4

* 3.3:
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
This commit is contained in:
Nicolas Grekas 2017-12-14 23:31:23 +01:00
commit 1e1b85c99c
2 changed files with 17 additions and 1 deletions

View File

@ -143,6 +143,14 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertFalse($container->hasDefinition('fragment.renderer.esi'), 'The ESI fragment renderer is not registered');
}
public function testEsiInactive()
{
$container = $this->createContainerFromFile('default_config');
$this->assertFalse($container->hasDefinition('fragment.renderer.esi'));
$this->assertFalse($container->hasDefinition('esi'));
}
public function testSsi()
{
$container = $this->createContainerFromFile('full');
@ -167,6 +175,14 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertTrue($container->hasDefinition('fragment.renderer.ssi'), 'The SSI fragment renderer is registered');
}
public function testSsiInactive()
{
$container = $this->createContainerFromFile('default_config');
$this->assertFalse($container->hasDefinition('fragment.renderer.ssi'));
$this->assertFalse($container->hasDefinition('ssi'));
}
public function testEnabledProfiler()
{
$container = $this->createContainerFromFile('profiler');

View File

@ -121,7 +121,7 @@ class AddSessionDomainConstraintPassTest extends TestCase
);
$ext = new FrameworkExtension();
$ext->load(array(), $container);
$ext->load(array('framework' => array('csrf_protection' => false)), $container);
$ext = new SecurityExtension();
$ext->load($config, $container);