mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
Fix NativeExtensionTest
This commit is contained in:
@@ -13,14 +13,17 @@ class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
public function testGetProperties()
|
public function testGetProperties()
|
||||||
{
|
{
|
||||||
$loader = new Twig_Loader_String('{{ d1.date }}{{ d2.date }}');
|
$twig = new Twig_Environment(new Twig_Loader_String(), array(
|
||||||
|
|
||||||
$twig = new Twig_Environment($loader, array(
|
|
||||||
'debug' => true,
|
'debug' => true,
|
||||||
'cache' => false,
|
'cache' => false,
|
||||||
'autoescape' => array($this, 'escapingStrategyCallback'),
|
'autoescape' => false
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$twig->render('{{ d1.date }}{{ d2.date }}', array(
|
||||||
|
'd1' => new DateTime,
|
||||||
|
'd2' => new DateTime
|
||||||
|
));
|
||||||
|
|
||||||
// If it fails, PHP will crash.
|
// If it fails, PHP will crash.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user