12345678910111213141516171819202122232425262728293031323334353637383940 |
- --TEST--
- "defined" test
- --TEMPLATE--
- {{ definedVar is defined ? 'ok' : 'ko' }}
- {{ definedVar is not defined ? 'ko' : 'ok' }}
- {{ undefinedVar is defined ? 'ko' : 'ok' }}
- {{ undefinedVar is not defined ? 'ok' : 'ko' }}
- {{ zeroVar is defined ? 'ok' : 'ko' }}
- {{ nullVar is defined ? 'ok' : 'ko' }}
- {{ nested.definedVar is defined ? 'ok' : 'ko' }}
- {{ nested.definedVar is not defined ? 'ko' : 'ok' }}
- {{ nested.undefinedVar is defined ? 'ko' : 'ok' }}
- {{ nested.undefinedVar is not defined ? 'ok' : 'ko' }}
- {{ nested.zeroVar is defined ? 'ok' : 'ko' }}
- {{ nested.nullVar is defined ? 'ok' : 'ko' }}
- --DATA--
- return array(
- 'definedVar' => 'defined',
- 'zeroVar' => 0,
- 'nullVar' => null,
- 'nested' => array(
- 'definedVar' => 'defined',
- 'zeroVar' => 0,
- 'nullVar' => null,
- )
- );
- --EXPECT--
- ok
- ok
- ok
- ok
- ok
- ok
- ok
- ok
- ok
- ok
- ok
- ok
|