/** * {@inheritdoc} */ public function getConfig() { $result = array_merge(include __DIR__ . '/config/module.config.php', include __DIR__ . '/config/router.config.php', include __DIR__ . '/config/di.config.php', include __DIR__ . '/config/states.config.php', include __DIR__ . '/config/languages.config.php'); $result = InitParamListener::attachToConsoleRoutes($result); return $result; }
public function testAttachToConsoleRoutesManyRoute() { $inputConfig = ['console' => ['router' => ['routes' => [['options' => ['route' => 'one_route']], ['options' => ['route' => 'two_route']], ['options' => ['route' => 'three_route']], ['options' => ['route' => 'four_route']], ['options' => ['route' => 'five_route']]]]]]; $expectedConfig = ['console' => ['router' => ['routes' => [['options' => ['route' => 'one_route [--magento_init_params=]']], ['options' => ['route' => 'two_route [--magento_init_params=]']], ['options' => ['route' => 'three_route [--magento_init_params=]']], ['options' => ['route' => 'four_route [--magento_init_params=]']], ['options' => ['route' => 'five_route [--magento_init_params=]']]]]]]; $this->assertEquals($expectedConfig, InitParamListener::attachToConsoleRoutes($inputConfig)); }