empty.test 390B

123456789101112131415161718
  1. --TEST--
  2. "empty" test
  3. --TEMPLATE--
  4. {{ foo is empty ? 'ok' : 'ko' }}
  5. {{ bar is empty ? 'ok' : 'ko' }}
  6. {{ foobar is empty ? 'ok' : 'ko' }}
  7. {{ array is empty ? 'ok' : 'ko' }}
  8. {{ zero is empty ? 'ok' : 'ko' }}
  9. {{ string is empty ? 'ok' : 'ko' }}
  10. --DATA--
  11. return array('foo' => '', 'bar' => null, 'foobar' => false, 'array' => array(), 'zero' => 0, 'string' => '0');
  12. --EXPECT--
  13. ok
  14. ok
  15. ok
  16. ok
  17. ko
  18. ko