xref: /PHP-7.2/ext/tidy/tests/022.phpt (revision 17ccbeec)
1--TEST--
2tidy_repair_*() and invalid parameters
3--SKIPIF--
4<?php if (!extension_loaded("tidy")) print "skip"; ?>
5--FILE--
6<?php
7
8$l = 1;
9$s = "";
10$a = array();
11
12tidy_repair_string($s, $l, $l, $l);
13tidy_repair_string($s, $s, $s, $s);
14tidy_repair_string($l, $l, $l ,$l);
15tidy_repair_string($a, $a, $a, $a);
16
17tidy_repair_file($s, $l, $l, $l);
18tidy_repair_file($s, $s, $s, $s);
19tidy_repair_file($l, $l, $l ,$l);
20tidy_repair_file($a, $a, $a, $a);
21
22echo "Done\n";
23?>
24--EXPECTF--
25Warning: tidy_repair_string(): Could not load configuration file '1' in %s on line %d
26
27Warning: tidy_repair_string(): Could not set encoding '1' in %s on line %d
28
29Warning: tidy_repair_string(): Could not load configuration file '' in %s on line %d
30
31Warning: tidy_repair_string(): Could not load configuration file '1' in %s on line %d
32
33Warning: tidy_repair_string(): Could not set encoding '1' in %s on line %d
34
35Warning: tidy_repair_string() expects parameter 1 to be string, array given in %s on line %d
36
37Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d
38
39Warning: tidy_repair_file(): Filename cannot be empty in %s on line %d
40
41Warning: tidy_repair_file() expects parameter 1 to be a valid path, array given in %s on line %d
42Done
43