projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
3111e12
)
Add tests for getting constants from instances.
author
Mark Story
<mark@mark-story.com>
Fri, 11 Jan 2013 04:37:47 +0000 (23:37 -0500)
committer
Mark Story
<mark@mark-story.com>
Fri, 11 Jan 2013 04:37:47 +0000 (23:37 -0500)
test/Twig/Tests/Fixtures/functions/constant.test
patch
|
blob
|
history
diff --git
a/test/Twig/Tests/Fixtures/functions/constant.test
b/test/Twig/Tests/Fixtures/functions/constant.test
index
6d4b374
..
6312879
100644
(file)
--- a/
test/Twig/Tests/Fixtures/functions/constant.test
+++ b/
test/Twig/Tests/Fixtures/functions/constant.test
@@
-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