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