/**
  * @return CommandTester
  */
 private function createCommandTester()
 {
     $application = new Application();
     $command = new RouterDebugCommand();
     $command->setContainer($this->getContainer());
     $application->add($command);
     return new CommandTester($application->find('router:debug'));
 }
 /**
  * @Route("/links")
  * @Template()
  * @Method("GET")
  */
 public function indexAction(Request $request)
 {
     $command = new RouterDebugCommand();
     $command->setContainer($this->container);
     $input = new StringInput('');
     $output = new BufferedOutput();
     $resultCode = $command->run($input, $output);
     // Removing the first line og the output
     $route_list = preg_replace('/^.+\\n/', '', $output->fetch());
     return array('route_list' => $route_list, 'allowed_hosts' => explode('|', $this->container->getParameter('zee_route_list.allowed_hosts')));
 }
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('fos:js-routing:debug')->setDescription('Displays currently exposed routes for an application')->setHelp(<<<EOF
The <info>fos:js-routing:debug</info> command displays an application's routes which will be available via JavaScript.

  <info>php app/console fos:js-routing:debug</info>

You can alternatively specify a route name as an argument to get more info about that specific route:

  <info>php app/console fos:js-routing:debug my_route</info>

EOF
);
    }
    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('fos:js-routing:debug')->setAliases(array())->setDescription('Displays currently exposed routes for an application')->setHelp(<<<EOF
The <info>fos:js-routing:debug</info> command displays an application's routes which will be available via JavaScript.

  <info>php app/console fos:js-routing:debug</info>

You can alternatively specify a route name as an argument to get more info about that specific route:

  <info>php app/console fos:js-routing:debug my_route</info>

EOF
)->addOption('sets', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Dump only routes from specific set');
    }