mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 20:36:33 +00:00
Add tests for getting constants from instances.
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
--TEST--
|
--TEST--
|
||||||
"constant" function
|
"constant" function
|
||||||
--TEMPLATE--
|
--TEMPLATE--
|
||||||
{% if constant('DATE_W3C') == expect %}
|
{{ constant('DATE_W3C') == expect ? 'true' : 'false' }}
|
||||||
true
|
{{ constant('ARRAY_AS_PROPS', object) }}
|
||||||
{% else %}
|
|
||||||
false
|
|
||||||
{% endif %}
|
|
||||||
--DATA--
|
--DATA--
|
||||||
return array('expect' => DATE_W3C);
|
return array('expect' => DATE_W3C, 'object' => new ArrayObject(array('hi')));
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
true
|
true
|
||||||
|
2
|
||||||
|
|||||||
Reference in New Issue
Block a user