setUpSmarty(dirname(__FILE__)); $this->smarty->setEscapeHtml(true); } /** * test 'escapeHtml' property */ public function testAutoEscape() { $tpl = $this->smarty->createTemplate('eval:{$foo}'); $tpl->assign('foo', ''); $this->assertEquals("<a@b.c>", $this->smarty->fetch($tpl)); } }