--TEST--
"defined" support for attribute
--TEMPLATE--
{{ attribute(nested, "definedVar")     is     defined ? 'ok' : 'ko' }}
{{ attribute(nested, "undefinedVar")   is not defined ? 'ok' : 'ko' }}
{{ attribute(nested, definedVarName)   is     defined ? 'ok' : 'ko' }}
{{ attribute(nested, undefinedVarName) is not defined ? 'ok' : 'ko' }}
--DATA--
return [
    'nested' => [
        'definedVar' => 'defined',
    ],
    'definedVarName' => 'definedVar',
    'undefinedVarName' => 'undefinedVar',
]
--EXPECT--
ok
ok
ok
ok
--DATA--
return [
    'nested' => [
        'definedVar' => 'defined',
    ],
    'definedVarName' => 'definedVar',
    'undefinedVarName' => 'undefinedVar',
]
--CONFIG--
return ['strict_variables' => false]
--EXPECT--
ok
ok
ok
ok
