[WebProfilerBundle] Set NullLogger for functional tests

This commit is contained in:
Thomas Calvet 2020-06-09 10:25:18 +02:00
parent 6ee6b2e1b8
commit 0b9519975d
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,7 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\Functional;
use Psr\Log\NullLogger;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Bundle\TwigBundle\TwigBundle;
@ -73,6 +74,11 @@ class WebProfilerBundleKernel extends Kernel
return sys_get_temp_dir().'/log-'.spl_object_hash($this);
}
protected function build(ContainerBuilder $container)
{
$container->register('logger', NullLogger::class);
}
public function homepageController()
{
return new Response('<html><head></head><body>Homepage Controller.</body></html>');