1--TEST--
2Tidy with basedir restriction failure on configuration file
3--EXTENSIONS--
4tidy
5--INI--
6open_basedir={PWD}/open_basedir
7--FILE--
8<?php
9echo "=== repairString ===\n";
10$tidy = new tidy;
11$tidy->repairString('my epic string', 'my_config_file.ini');
12
13echo "=== tidy_parse_string ===\n";
14tidy_parse_string('my epic string', 'my_config_file.ini');
15
16echo "=== tidy_parse_file ===\n";
17tidy_parse_file(__DIR__.'/open_basedir/test.html', 'my_config_file.ini');
18
19echo "=== __construct ===\n";
20try {
21    $tidy = new tidy(__DIR__.'/open_basedir/test.html', 'my_config_file.ini');
22} catch (Exception $e) {
23    echo $e->getMessage(), "\n";
24}
25
26echo "=== parseFile ===\n";
27$tidy = new tidy;
28$tidy->parseFile(__DIR__.'/open_basedir/test.html', 'my_config_file.ini');
29
30echo "=== parseString ===\n";
31$tidy = new tidy;
32$tidy->parseString('my epic string', 'my_config_file.ini');
33?>
34--EXPECTF--
35=== repairString ===
36
37Warning: tidy::repairString(): open_basedir restriction in effect. File(my_config_file.ini) is not within the allowed path(s): (%sopen_basedir) in %s on line %d
38=== tidy_parse_string ===
39
40Warning: tidy_parse_string(): open_basedir restriction in effect. File(my_config_file.ini) is not within the allowed path(s): (%sopen_basedir) in %s on line %d
41=== tidy_parse_file ===
42
43Warning: tidy_parse_file(): open_basedir restriction in effect. File(my_config_file.ini) is not within the allowed path(s): (%sopen_basedir) in %s on line %d
44=== __construct ===
45tidy::__construct(): open_basedir restriction in effect. File(my_config_file.ini) is not within the allowed path(s): (%sopen_basedir)
46=== parseFile ===
47
48Warning: tidy::parseFile(): open_basedir restriction in effect. File(my_config_file.ini) is not within the allowed path(s): (%sopen_basedir) in %s on line %d
49=== parseString ===
50
51Warning: tidy::parseString(): open_basedir restriction in effect. File(my_config_file.ini) is not within the allowed path(s): (%sopen_basedir) in %s on line %d
52