<commit_before><?php

namespace Zend\Test\PHPUnit\Mvc\Service;

use Zend\Mvc\Service\ServiceListenerFactory as BaseServiceListenerFactory;

class ServiceListenerFactory extends BaseServiceListenerFactory
{
    protected $defaultServiceConfig = array(
        'invokables' => array(
            'DispatchListener' => 'Zend\Mvc\DispatchListener',
            'RouteListener'    => 'Zend\Mvc\RouteListener',
            'Request'          => 'Zend\Http\PhpEnvironment\Request', // override
            'Response'         => 'Zend\Http\PhpEnvironment\Response', // override
            'ViewManager'      => 'Zend\Mvc\View\Http\ViewManager', // override
        ),
        'factories' => array(
            'Application'             => 'Zend\Mvc\Service\ApplicationFactory',
            'Config'                  => 'Zend\Mvc\Service\ConfigFactory',
            'ControllerLoader'        => 'Zend\Mvc\Service\ControllerLoaderFactory',
            'ControllerPluginManager' => 'Zend\Mvc\Service\ControllerPluginManagerFactory',
            'ConsoleAdapter'          => 'Zend\Mvc\Service\ConsoleAdapterFactory',
            'ConsoleRouter'           => 'Zend\Mvc\Service\RouterFactory',
            'DependencyInjector'      => 'Zend\Mvc\Service\DiFactory',
            'HttpRouter'              => 'Zend\Mvc\Service\RouterFactory',
            'Router'                  => 'Zend\Test\PHPUnit\Mvc\Service\RouterFactory', // override
            'ViewHelperManager'       => 'Zend\Mvc\Service\ViewHelperManagerFactory',
            'ViewFeedRenderer'        => 'Zend\Mvc\Service\ViewFeedRendererFactory',
            'ViewFeedStrategy'        => 'Zend\Mvc\Service\ViewFeedStrategyFactory',
            'ViewJsonRenderer'        => 'Zend\Mvc\Service\ViewJsonRendererFactory',
            'ViewJsonStrategy'        => 'Zend\Mvc\Service\ViewJsonStrategyFactory',
            'ViewResolver'            => 'Zend\Mvc\Service\ViewResolverFactory',
            'ViewTemplateMapResolver' => 'Zend\Mvc\Service\ViewTemplateMapResolverFactory',
            'ViewTemplatePathStack'   => 'Zend\Mvc\Service\ViewTemplatePathStackFactory',
        ),
        'aliases' => array(
            'Configuration'                          => 'Config',
            'Console'                                => 'ConsoleAdapter',
            'ControllerPluginBroker'                 => 'ControllerPluginManager',
            'Di'                                     => 'DependencyInjector',
            'Zend\Di\LocatorInterface'               => 'DependencyInjector',
            'Zend\Mvc\Controller\PluginBroker'       => 'ControllerPluginBroker',
            'Zend\Mvc\Controller\PluginManager'      => 'ControllerPluginManager',
            'Zend\View\Resolver\TemplateMapResolver' => 'ViewTemplateMapResolver',
            'Zend\View\Resolver\TemplatePathStack'   => 'ViewTemplatePathStack',
            'Zend\View\Resolver\AggregateResolver'   => 'ViewResolver',
            'Zend\View\Resolver\ResolverInterface'   => 'ViewResolver',
        ),
    );<commit_msg>Improve the update of ServiceListener of the tests lib<commit_after><?php

namespace Zend\Test\PHPUnit\Mvc\Service;

use Zend\Mvc\Service\ServiceListenerFactory as BaseServiceListenerFactory;

class ServiceListenerFactory extends BaseServiceListenerFactory
{
    protected $testServiceConfig = array(
        'invokables' => array(
            'Request'          => 'Zend\Http\PhpEnvironment\Request',
            'Response'         => 'Zend\Http\PhpEnvironment\Response',
            'ViewManager'      => 'Zend\Mvc\View\Http\ViewManager',
        ),
        'factories' => array(
            'Router'           => 'Zend\Test\PHPUnit\Mvc\Service\RouterFactory',
        ),
    );

    public function __construct()
    {
        // merge basee config with specific tests config
        $this->defaultServiceConfig = array_replace_recursive(
            $this->defaultServiceConfig, $this->testServiceConfig
        );

        // delete the factory which has moved
        unset($this->defaultServiceConfig['factories']['Request']);
        unset($this->defaultServiceConfig['factories']['Response']);
        unset($this->defaultServiceConfig['factories']['ViewManager']);
    }
{'fraction_non_alphanumeric': 0.1204933586337761, 'fraction_numerical': 0.0, 'mean_word_length': 2.2338957055214723, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3019447', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1087, 'n_words': 147}