021.phpt 588 B

1234567891011121314151617181920212223
  1. --TEST--
  2. tidy_get_opt_doc()
  3. --EXTENSIONS--
  4. tidy
  5. --SKIPIF--
  6. <?php if (!function_exists('tidy_get_opt_doc')) print "skip"; ?>
  7. --FILE--
  8. <?php
  9. try {
  10. tidy_get_opt_doc(new tidy, 'some_bogus_cfg');
  11. } catch (ValueError $exception) {
  12. echo $exception->getMessage() . "\n";
  13. }
  14. $t = new tidy;
  15. var_dump($t->getOptDoc('ncr'));
  16. var_dump(strlen(tidy_get_opt_doc($t, 'wrap')) > 99);
  17. ?>
  18. --EXPECT--
  19. tidy_get_opt_doc(): Argument #2 ($option) is an invalid configuration option, "some_bogus_cfg" given
  20. string(73) "This option specifies if Tidy should allow numeric character references. "
  21. bool(true)