/** * @todo Implement testSetup(). */ public function testSetup() { $registerData = array(); SmartyWrapper::setup(new UnitTestPWECore(), $registerData); }
public function addContent(SmartyWrapper $smarty, $tag = false) { $this->htmlContent[$tag] .= $smarty->fetchAll(); PWELogger::debug("Content %s [%d]: %s...", $tag, strlen($this->htmlContent[$tag]), substr($this->htmlContent[$tag], 0, 64)); }
/** * @param $contents * @param $dir * @param $ext */ private function processSmarty($contents, $dir, $ext) { $node = $this->PWE->getNode(); $tpl = $node['!i']['layout_tpl'] ?: __DIR__ . '/wiki.tpl'; $smarty = new SmartyWrapper($this->PWE); $smarty->setTemplateFile($tpl); $smarty->assign('content', $contents); if ($this->config instanceof TOCProvider) { $sidebar = $this->config->getToc(); } else { $sidebar = ""; } if (!$node['!a']['no_sidebar_file'] && is_file($dir . '/Sidebar.' . $ext)) { $sidebar .= $this->renderPage($dir . '/Sidebar.' . $ext); } $smarty->assign("sidebar", $sidebar); $this->PWE->addContent($smarty); }