$this->assertInstanceof('Twig_Markup', $template->getAttribute($template1, 'string'));
$this->assertEquals('some_string', $template->getAttribute($template1, 'string'));
+
$this->assertInstanceof('Twig_Markup', $template->getAttribute($template1, 'true'));
$this->assertEquals('1', $template->getAttribute($template1, 'true'));
+
+ $this->assertInstanceof('Twig_Markup', $template->getAttribute($template1, 'zero'));
+ $this->assertEquals('0', $template->getAttribute($template1, 'zero'));
+
$this->assertNotInstanceof('Twig_Markup', $template->getAttribute($template1, 'empty'));
$this->assertSame('', $template->getAttribute($template1, 'empty'));
}
Twig_Template::clearCache();
}
+ public function getZero()
+ {
+ return 0;
+ }
+
public function getEmpty()
{
return '';