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() { global $phpbb_root_path, $phpEx, $config, $user; $this->template_path = dirname(__FILE__) . '/templates'; $this->parent_template_path = dirname(__FILE__) . '/parent_templates'; $this->template_locator = new phpbb_template_locator(); $this->template_provider = new phpbb_template_path_provider(new phpbb_mock_extension_manager(dirname(__FILE__) . '/')); $this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider); $this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path); } }