'divisibleby' => new Twig_Test_Node('Twig_Node_Expression_Test_Divisibleby'),
'constant' => new Twig_Test_Node('Twig_Node_Expression_Test_Constant'),
'empty' => new Twig_Test_Function('twig_test_empty'),
+ 'array' => new Twig_Test_Function('is_array'),
);
}
--- /dev/null
+--TEST--
+"is_array" test
+--TEMPLATE--
+{{ foo is array ? 'ok' : 'ko' }}
+{{ obj is array ? 'ok' : 'ko' }}
+{{ val is array ? 'ok' : 'ko' }}
+--DATA--
+return array(
+ 'foo' => array(),
+ 'obj' => new stdClass(),
+ 'val' => 'test',
+);
+--EXPECT--
+ok
+ko
+ko
\ No newline at end of file