Add tests

This commit is contained in:
Ivan Shalganov
2013-09-14 11:24:23 +04:00
parent 0a9facc493
commit 2fc84c226e
7 changed files with 177 additions and 60 deletions

View File

@ -430,18 +430,18 @@ class Fenom
"float_tags" => array()
);
if (method_exists($storage, $compiler . "Open")) {
$c["open"] = $compiler . "Open";
$c["open"] = array($storage, $compiler . "Open");
} else {
throw new \LogicException("Open compiler {$compiler}Open not found");
}
if (method_exists($storage, $compiler . "Close")) {
$c["close"] = $compiler . "Close";
$c["close"] = array($storage, $compiler . "Close");
} else {
throw new \LogicException("Close compiler {$compiler}Close not found");
}
foreach ($tags as $tag) {
if (method_exists($storage, "tag" . $tag)) {
$c["tags"][$tag] = "tag" . $tag;
$c["tags"][$tag] = array($storage, "tag" . $tag);
if ($floats && in_array($tag, $floats)) {
$c['float_tags'][$tag] = 1;
}
@ -767,7 +767,6 @@ class Fenom
$fenom = $this; // used in template
$_tpl = include($this->_compile_dir . "/" . $file_name);
/* @var Fenom\Render $_tpl */
// var_dump($tpl, $_tpl->isValid()); exit;
if (!($this->_options & self::AUTO_RELOAD) || ($this->_options & self::AUTO_RELOAD) && $_tpl->isValid()) {
return $_tpl;
}