src/Behat/Behat/Output/ServiceContainer/Formatter/JUnitFormatterFactory.php
private function loadRootNodeListener(ContainerBuilder $container)
    {

        $definition = new Definition('Behat\Behat\Output\Node\EventListener\JUnit\JUnitOutlineStoreListener', array(
                new Reference('output.node.printer.junit.suite')
            )
        );
        $container->setDefinition('output.node.listener.junit.outline', $definition);

        $definition = new Definition(
            'Behat\Behat\Output\Node\EventListener\JUnit\JUnitDurationListener'
        );

        $container->setDefinition('output.node.listener.junit.duration', $definition);

        $definition = new Definition('Behat\Testwork\Output\Node\EventListener\ChainEventListener', array(
            array(
                new Reference('output.node.listener.junit.duration'),
                new Reference('output.node.listener.junit.outline'),
                new Definition('Behat\Behat\Output\Node\EventListener\JUnit\JUnitFeatureElementListener', array(
                    new Reference('output.node.printer.junit.feature'),
                    new Reference('output.node.printer.junit.scenario'),
                    new Reference('output.node.printer.junit.step'),
                    new Reference('output.node.printer.junit.setup'),
                )),
            ),
        ));
        $container->setDefinition(self::ROOT_LISTENER_ID, $definition);
    }
private function loadRootNodeListener(ContainerBuilder $container)
    {

        $definition = new Definition('Behat\Behat\Output\Node\EventListener\JUnit\JUnitOutlineStoreListener', array(
                new Reference('output.node.printer.junit.suite')
            )
        );
        $container->setDefinition('output.node.listener.junit.outline', $definition);

        $definition = new Definition(
            'Behat\Behat\Output\Node\EventListener\JUnit\JUnitDurationListener'
        );

        $container->setDefinition('output.node.listener.junit.duration', $definition);

        $definition = new Definition('Behat\Testwork\Output\Node\EventListener\ChainEventListener', array(
            array(
                new Reference('output.node.listener.junit.duration'),
                new Reference('output.node.listener.junit.outline'),
                new Definition('Behat\Behat\Output\Node\EventListener\JUnit\JUnitFeatureElementListener', array(
                    new Reference('output.node.printer.junit.feature'),
                    new Reference('output.node.printer.junit.scenario'),
                    new Reference('output.node.printer.junit.step'),
                    new Reference('output.node.printer.junit.setup'),
                )),
            ),
        ));
        $container->setDefinition(self::ROOT_LISTENER_ID, $definition);
    }
private function loadRootNodeListener ( ContainerBuilder $ container ) { $ definition = new Definition ( 'Behat\Behat\Output\Node\EventListener\JUnit\JUnitOutlineStoreListener' , array ( new Reference ( 'output.node.printer.junit.suite' ) ) ) ; $ container -> setDefinition ( 'output.node.listener.junit.outline' , $ definition ) ; $ definition = new Definition ( 'Behat\Behat\Output\Node\EventListener\JUnit\JUnitDurationListener' ) ; $ container -> setDefinition ( 'output.node.listener.junit.duration' , $ definition ) ; $ definition = new Definition ( 'Behat\Testwork\Output\Node\EventListener\ChainEventListener' , array ( array ( new Reference ( 'output.node.listener.junit.duration' ) , new Reference ( 'output.node.listener.junit.outline' ) , new Definition ( 'Behat\Behat\Output\Node\EventListener\JUnit\JUnitFeatureElementListener' , array ( new Reference ( 'output.node.printer.junit.feature' ) , new Reference ( 'output.node.printer.junit.scenario' ) , new Reference ( 'output.node.printer.junit.step' ) , new Reference ( 'output.node.printer.junit.setup' ) , ) ) , ) , ) ) ; $ container -> setDefinition ( self :: ROOT_LISTENER_ID , $ definition ) ; }
Loads the node listeners required for JUnit printers to work.

@param ContainerBuilder $container
Loads the node listeners required for JUnit printers to work .