Skip to content

Commit 7fef930

Browse files
fix: loading of WebProfilerBundle’s toolbar stylesheet
1 parent ebbdb22 commit 7fef930

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/wdt.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd">
66

7-
<route id="_wdt_stylesheet" path="/styles.css">
7+
<route id="_wdt_stylesheet" path="/styles">
88
<default key="_controller">web_profiler.controller.profiler::toolbarStylesheetAction</default>
99
</route>
1010

src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ public function testToolbarStylesheetActionWithProfilerDisabled()
152152

153153
public function testToolbarStylesheetAction()
154154
{
155-
$urlGenerator = $this->createMock(UrlGeneratorInterface::class);
156-
$twig = $this->createMock(Environment::class);
157-
$profiler = $this->createMock(Profiler::class);
155+
$kernel = new WebProfilerBundleKernel();
156+
$client = new KernelBrowser($kernel);
158157

159-
$controller = new ProfilerController($urlGenerator, $profiler, $twig, []);
158+
$client->request('GET', '/_wdt/styles');
159+
160+
$response = $client->getResponse();
160161

161-
$response = $controller->toolbarStylesheetAction();
162162
$this->assertSame(200, $response->getStatusCode());
163-
$this->assertSame('text/css', $response->headers->get('Content-Type'));
163+
$this->assertSame('text/css; charset=UTF-8', $response->headers->get('Content-Type'));
164164
$this->assertSame('max-age=600, private', $response->headers->get('Cache-Control'));
165165
}
166166

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy