We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1c899a commit 9ee4a06Copy full SHA for 9ee4a06
ext/tidy/tests/tidy_error1.phpt
@@ -20,11 +20,20 @@ try {
20
$config = ['neither'];
21
try {
22
$tidy->parseString($buffer, $config);
23
-} catch (\Error $e) {
+} catch (\TypeError $e) {
24
+ echo $e->getMessage(), PHP_EOL;
25
+}
26
+
27
+$config = ['doctype-mode' => 'customtag'];
28
29
+try {
30
+ var_dump($tidy->parseString($buffer, $config));
31
+} catch (\ValueError $e) {
32
echo $e->getMessage(), PHP_EOL;
33
}
34
35
?>
---EXPECTF--
36
+--EXPECT--
37
tidy::parseString(): Argument #2 ($config) Unknown Tidy configuration option "bogus"
38
tidy::parseString(): Argument #2 ($config) must be of type array with keys as string
39
+tidy::parseString(): Argument #2 ($config) Attempting to set read-only option "doctype-mode"
0 commit comments