/**
  * @param ServiceLocatorInterface $serviceLocator
  * @param Module $module
  * @return array
  */
 protected function getConfig(ServiceLocatorInterface $serviceLocator, Module $module)
 {
     // Load same configs as the ConfigListener would...
     $applicationConfiguration = $serviceLocator->get('ApplicationConfig');
     $listenerOptions = new ListenerOptions($applicationConfiguration['module_listener_options']);
     $configPaths = array_merge($this->getConfigPaths($listenerOptions->getConfigGlobPaths(), ConfigListener::GLOB_PATH), $this->getConfigPaths($listenerOptions->getConfigStaticPaths(), ConfigListener::STATIC_PATH));
     $config = $module->getConfig();
     $configs = array();
     foreach ($configPaths as $path) {
         $configs = array_merge($configs, $this->getConfigsByPath($path['path'], $path['type']));
     }
     foreach ($configs as $cfg) {
         $config = ArrayUtils::merge($config, $cfg);
     }
     return $config;
 }
 public function testModuleProvidesServiceConfig()
 {
     $config = $this->module->getServiceConfig();
     $this->assertTrue(is_array($config));
 }