protected function generate_route_objects()
{
$this->request = new phpbb_mock_request();
$this->request->overwrite('SCRIPT_NAME', $this->get_uri(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SCRIPT_FILENAME', $this->get_script_name(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('REQUEST_URI', $this->get_base_uri(), \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SERVER_NAME', 'localhost', \phpbb\request\request_interface::SERVER);
$this->request->overwrite('SERVER_PORT', '80', \phpbb\request\request_interface::SERVER);
$this->symfony_request = new \phpbb\symfony_request($this->request);
$this->filesystem = new \phpbb\filesystem\filesystem();
$this->phpbb_path_helper = new \phpbb\path_helper($this->symfony_request, $this->filesystem, $this->request, $phpbb_root_path, $phpEx);
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
$lang = new \phpbb\language\language($lang_loader);
$this->user = new \phpbb\user($lang, '\\phpbb\\datetime');
$container = new phpbb_mock_container_builder();
$container->setParameter('core.environment', PHPBB_ENVIRONMENT);
$cache_path = $phpbb_root_path . 'cache/twig';
$context = new \phpbb\template\context();
$loader = new \phpbb\template\twig\loader($this->filesystem, '');
$twig = new \phpbb\template\twig\environment($this->config, $this->filesystem, $this->phpbb_path_helper, $container, $cache_path, null, $loader, array('cache' => false, 'debug' => false, 'auto_reload' => true, 'autoescape' => false));
$this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $this->user)));
$container->set('template.twig.lexer', new \phpbb\template\twig\lexer($twig));
$this->extension_manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array('vendor2/foo' => array('ext_name' => 'vendor2/foo', 'ext_active' => '1', 'ext_path' => 'ext/vendor2/foo/')));
$this->router = new phpbb_mock_router($container, $this->filesystem, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT, $this->extension_manager);
$this->router->find_routing_files($this->extension_manager->all_enabled(false));
$this->router->find(dirname(__FILE__) . '/');
// Set correct current phpBB root path
$this->root_path = $this->get_phpbb_root_path();
}