mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 09:54:27 +02:00
Added test to see what changed exactly
This commit is contained in:
@@ -133,5 +133,19 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty
|
|||||||
$this->assertTrue($exceptionThrown);
|
$this->assertTrue($exceptionThrown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testUsingNullAsAnArray() {
|
||||||
|
$this->smarty->setErrorReporting(E_ALL & ~E_NOTICE);
|
||||||
|
$this->smarty->muteUndefinedOrNullWarnings();
|
||||||
|
$tpl = $this->smarty->createTemplate('string:a{if $undef.k}def{/if}b');
|
||||||
|
$this->assertEquals("ab", $this->smarty->fetch($tpl));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testUsingFalseAsAnArray() {
|
||||||
|
$this->smarty->setErrorReporting(E_ALL & ~E_NOTICE);
|
||||||
|
$this->smarty->muteUndefinedOrNullWarnings();
|
||||||
|
$tpl = $this->smarty->createTemplate('string:a{if $nottrue.k}def{/if}b');
|
||||||
|
$this->smarty->assign('nottrue', false);
|
||||||
|
$this->assertEquals("ab", $this->smarty->fetch($tpl));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user