minor #37164 [WebProfilerBundle] Set NullLogger for functional tests (fancyweb)

This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Set NullLogger for functional tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | https://github.com/symfony/symfony/issues/36962
| License       | MIT
| Doc PR        | -

Commits
-------

0b9519975d [WebProfilerBundle] Set NullLogger for functional tests
This commit is contained in:
Nicolas Grekas 2020-06-09 11:15:27 +02:00
commit 911c5d5cbd
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>');