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