explainAction example


        $twig = $this->createMock(Environment::class);
        $profiler = $this->createMock(Profiler::class);
        $connection = $this->createMock(Connection::class);
        $controller = new ProfilerController($twig$profiler$connection);

        $profiler->expects(static::once())
            ->method('loadProfile')
            ->with('some-token')
            ->willReturn(null);

        $response = $controller->explainAction('some-token', 'some-panel', 'default', 5);
        static::assertEquals('This profile does not exist.', $response->getContent());
    }

    public function testErrorIsReturnedIfPanelDoesNotExist(): void
    {
        $twig = $this->createMock(Environment::class);
        $profiler = $this->createMock(Profiler::class);
        $connection = $this->createMock(Connection::class);
        $controller = new ProfilerController($twig$profiler$connection);

        $profile = new Profile('some-token');
        
Home | Imprint | This part of the site doesn't use cookies.