Skip to content

Commit e6b1992

Browse files
author
Jeremiah VALERIE
committed
Merge branch '0.9' into 0.10
2 parents 22822a6 + daefb71 commit e6b1992

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Tests/Functional/App/TestKernel.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
use Symfony\Bundle\SecurityBundle\SecurityBundle;
88
use Symfony\Bundle\TwigBundle\TwigBundle;
99
use Symfony\Component\Config\Loader\LoaderInterface;
10+
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
11+
use Symfony\Component\DependencyInjection\ContainerBuilder;
1012
use Symfony\Component\HttpKernel\Kernel;
1113

12-
final class TestKernel extends Kernel
14+
final class TestKernel extends Kernel implements CompilerPassInterface
1315
{
1416
private $testCase;
1517

@@ -62,6 +64,21 @@ public function registerContainerConfiguration(LoaderInterface $loader)
6264
} else {
6365
$loader->load(__DIR__.'/config/config.yml');
6466
}
67+
68+
$loader->load(function (ContainerBuilder $container) {
69+
$container->addCompilerPass($this);
70+
});
71+
}
72+
73+
/**
74+
* {@inheritdoc}
75+
*/
76+
public function process(ContainerBuilder $container)
77+
{
78+
// disabled http_exception_listener because it flatten exception to html response
79+
if ($container->has('http_exception_listener')) {
80+
$container->removeDefinition('http_exception_listener');
81+
}
6582
}
6683

6784
private function basePath()

0 commit comments

Comments
 (0)