mirror of
https://github.com/twigphp/Twig.git
synced 2026-11-05 18:54:56 +00:00
14 lines
388 B
Plaintext
14 lines
388 B
Plaintext
--TEST--
|
|
"const" test
|
|
--TEMPLATE--
|
|
{{ 8 is constant('E_NOTICE') ? 'ok' : 'no' }}
|
|
{{ 'bar' is constant('Twig\\Tests\\TwigTestFoo::BAR_NAME') ? 'ok' : 'no' }}
|
|
{{ value is constant('Twig\\Tests\\TwigTestFoo::BAR_NAME') ? 'ok' : 'no' }}
|
|
{{ 2 is constant('ARRAY_AS_PROPS', object) ? 'ok' : 'no' }}
|
|
--DATA--
|
|
return ['value' => 'bar', 'object' => new \ArrayObject(['hi'])]
|
|
--EXPECT--
|
|
ok
|
|
ok
|
|
ok
|
|
ok |