WebProfilerBundleKernel example

$this->expectExceptionMessage('The profiler must be enabled.');

        $urlGenerator = $this->createMock(UrlGeneratorInterface::class);
        $twig = $this->createMock(Environment::class);

        $controller = new ProfilerController($urlGenerator, null, $twig[]);
        $controller->homeAction();
    }

    public function testHomeActionRedirect()
    {
        $kernel = new WebProfilerBundleKernel();
        $client = new KernelBrowser($kernel);

        $client->request('GET', '/_profiler/');

        $this->assertSame(302, $client->getResponse()->getStatusCode());
        $this->assertSame('/_profiler/empty/search/results?limit=10', $client->getResponse()->getTargetUrl());
    }

    public function testPanelActionWithLatestTokenWhenNoTokensExist()
    {
        $kernel = new WebProfilerBundleKernel();
        
Home | Imprint | This part of the site doesn't use cookies.