[WebProfilerBundle] Set NullLogger for functional tests
This commit is contained in:
parent
6ee6b2e1b8
commit
0b9519975d
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\WebProfilerBundle\Tests\Functional;
|
namespace Symfony\Bundle\WebProfilerBundle\Tests\Functional;
|
||||||
|
|
||||||
|
use Psr\Log\NullLogger;
|
||||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||||
@ -73,6 +74,11 @@ class WebProfilerBundleKernel extends Kernel
|
|||||||
return sys_get_temp_dir().'/log-'.spl_object_hash($this);
|
return sys_get_temp_dir().'/log-'.spl_object_hash($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function build(ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
$container->register('logger', NullLogger::class);
|
||||||
|
}
|
||||||
|
|
||||||
public function homepageController()
|
public function homepageController()
|
||||||
{
|
{
|
||||||
return new Response('<html><head></head><body>Homepage Controller.</body></html>');
|
return new Response('<html><head></head><body>Homepage Controller.</body></html>');
|
||||||
|
Reference in New Issue
Block a user