Skip to content

Commit a467a42

Browse files
orlitzkyweltling
authored andcommitted
ext/tidy: update the configuration file test to not inspect output.
One of the tests for tidy (016.phpt) is testing that we can use a configuration file (016.tcfg) instead of a string to configure tidy. It was observing the output of an API call, which proved too fragile now that we support tidy-html5 as well. Instead, the test was updated to inspect $tidy->getConfig() to ensure that the config file was actually processed and will be respected.
1 parent 846c72a commit a467a42

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

ext/tidy/tests/016.phpt

+5-16
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,10 @@ Passing configuration file through tidy_parse_file() (may fail with buggy libtid
44
<?php if (!extension_loaded("tidy")) print "skip"; ?>
55
--FILE--
66
<?php
7-
$tidy = tidy_parse_file(dirname(__FILE__)."/016.html", dirname(__FILE__)."/016.tcfg");
8-
tidy_clean_repair($tidy);
9-
echo tidy_get_output($tidy);
7+
$tidy = tidy_parse_file(dirname(__FILE__)."/016.html",
8+
dirname(__FILE__)."/016.tcfg");
9+
$cfg = $tidy->getConfig();
10+
echo $cfg["clean"];
1011
?>
1112
--EXPECT--
12-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
13-
<html>
14-
<head>
15-
<title></title>
16-
17-
<style type="text/css">
18-
p.c1 {font-weight: bold}
19-
</style>
20-
</head>
21-
<body>
22-
<p class="c1">testing</p>
23-
</body>
24-
</html>
13+
1

0 commit comments

Comments
 (0)