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