template->cachepath . str_replace('/', '.', $file) . '.php'; $this->assertFileNotExists($cache_file); $this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file); // Reset the engine state $this->setup_engine(); $this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file); } protected function setup_engine(array $new_config = array()) { global $phpbb_root_path, $phpEx, $user; $defaults = $this->config_defaults(); $config = new phpbb_config(array_merge($defaults, $new_config)); $this->template_path = dirname(__FILE__) . '/templates'; $this->parent_template_path = dirname(__FILE__) . '/parent_templates'; $this->style = new phpbb_style($phpbb_root_path, $phpEx, $config, $user, false); $this->style->set_custom_style('tests', array($this->template_path, $this->parent_template_path), ''); $this->template = $this->style->template; } }