File tree Expand file tree Collapse file tree 6 files changed +35
-3
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 6 files changed +35
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<parameters >
8
8
<parameter key =" debug.event_dispatcher.class" >Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher</parameter >
9
- <parameter key =" debug.stopwatch.class" >Symfony\Component\Stopwatch\Stopwatch</parameter >
10
9
<parameter key =" debug.container.dump" >%kernel.cache_dir%/%kernel.container_class%.xml</parameter >
11
10
<parameter key =" debug.controller_resolver.class" >Symfony\Component\HttpKernel\Controller\TraceableControllerResolver</parameter >
12
11
</parameters >
13
12
14
13
<services >
15
- <service id =" debug.stopwatch" class =" %debug.stopwatch.class%" />
16
-
17
14
<service id =" debug.event_dispatcher" class =" %debug.event_dispatcher.class%" >
18
15
<tag name =" monolog.logger" channel =" event" />
19
16
<argument type =" service" id =" debug.event_dispatcher.parent" />
Original file line number Diff line number Diff line change 6
6
7
7
<parameters >
8
8
<parameter key =" debug.debug_handlers_listener.class" >Symfony\Component\HttpKernel\EventListener\DebugHandlersListener</parameter >
9
+ <parameter key =" debug.stopwatch.class" >Symfony\Component\Stopwatch\Stopwatch</parameter >
9
10
</parameters >
10
11
11
12
<services >
17
18
<argument /><!-- Log levels map for enabled error levels -->
18
19
<argument >%kernel.debug%</argument >
19
20
</service >
21
+
22
+ <service id =" debug.stopwatch" class =" %debug.stopwatch.class%" />
20
23
</services >
21
24
</container >
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ container ->loadFromExtension ('framework ' , array ());
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <container xmlns =" http://symfony.com/schema/dic/services"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns : framework =" http://symfony.com/schema/dic/symfony"
5
+ xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
6
+ http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
7
+
8
+ <framework : config />
9
+ </container >
Original file line number Diff line number Diff line change
1
+ framework : ~
Original file line number Diff line number Diff line change @@ -402,6 +402,25 @@ public function testFormCsrfFieldNameUnderFormSettingsTakesPrecedence()
402
402
$ this ->assertEquals ('_custom_form ' , $ container ->getParameter ('form.type_extension.csrf.field_name ' ));
403
403
}
404
404
405
+ public function testStopwatchEnabledWithDebugModeEnabled ()
406
+ {
407
+ $ container = $ this ->createContainerFromFile ('default_config ' , array (
408
+ 'kernel.container_class ' => 'foo ' ,
409
+ 'kernel.debug ' => true ,
410
+ ));
411
+
412
+ $ this ->assertTrue ($ container ->has ('debug.stopwatch ' ));
413
+ }
414
+
415
+ public function testStopwatchEnabledWithDebugModeDisabled ()
416
+ {
417
+ $ container = $ this ->createContainerFromFile ('default_config ' , array (
418
+ 'kernel.container_class ' => 'foo ' ,
419
+ ));
420
+
421
+ $ this ->assertTrue ($ container ->has ('debug.stopwatch ' ));
422
+ }
423
+
405
424
protected function createContainer (array $ data = array ())
406
425
{
407
426
return new ContainerBuilder (new ParameterBag (array_merge (array (
You can’t perform that action at this time.
0 commit comments