mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
Fixed minor unit tests
This commit is contained in:
@@ -473,7 +473,7 @@ class Template extends BaseCompiler {
|
||||
public function compileTag($tag, $args, $parameter = []) {
|
||||
$this->prefixCodeStack[] = $this->prefix_code;
|
||||
$this->prefix_code = [];
|
||||
$result = $this->compileTag2($tag, $args, $parameter);
|
||||
$result = $this->compileTag2(strtolower($tag), $args, $parameter);
|
||||
$this->prefix_code = array_merge($this->prefix_code, array_pop($this->prefixCodeStack));
|
||||
return $result;
|
||||
}
|
||||
|
@@ -726,8 +726,8 @@ class Template extends TemplateBase {
|
||||
*
|
||||
* @api Smarty::isCached()
|
||||
*/
|
||||
public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null) {
|
||||
return $this->_execute($template, $cache_id, $compile_id, $parent, 2);
|
||||
public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null): bool {
|
||||
return (bool) $this->_execute($template, $cache_id, $compile_id, $parent, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -401,7 +401,7 @@ class PluginFunctionHtmlSelectDateTest extends PHPUnit_Smarty
|
||||
$result = '<select name="Date_Month">' . $n . $this->months['default'] . $n . '</select>'
|
||||
. $n . '<select name="Date_Day">' . $n . '<option value="">day</option>' . $n . $this->days['none'] . $n . '</select>'
|
||||
. $n . '<select name="Date_Year">' . $n . $this->years['start_2005'] . $n . '</select>';
|
||||
$tpl = $this->smarty->createTemplate('eval:{html_select_date time="2022-02-" day_empty="day" start_year=2005}');
|
||||
$tpl = $this->smarty->createTemplate('eval:{html_select_date time="' . date('Y', $this->now) . '-02-" day_empty="day" start_year=2005}');
|
||||
$this->assertEquals($result, $tpl->fetch());
|
||||
}
|
||||
|
||||
@@ -410,7 +410,7 @@ class PluginFunctionHtmlSelectDateTest extends PHPUnit_Smarty
|
||||
$result = '<select name="Date_Month">' . $n . '<option value="">month</option>' . $n . $this->months['none'] . $n . '</select>'
|
||||
. $n . '<select name="Date_Day">' . $n . $this->days['default'] . $n . '</select>'
|
||||
. $n . '<select name="Date_Year">' . $n . $this->years['start_2005'] . $n . '</select>';
|
||||
$tpl = $this->smarty->createTemplate('eval:{html_select_date time="2022--20" month_empty="month" start_year=2005}');
|
||||
$tpl = $this->smarty->createTemplate('eval:{html_select_date time="' . date('Y', $this->now) . '--20" month_empty="month" start_year=2005}');
|
||||
$this->assertEquals($result, $tpl->fetch());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user