diff options
author | Michael Orlitzky <michael@orlitzky.com> | 2016-06-09 23:29:14 -0400 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-07-11 14:05:43 +0200 |
commit | a467a42dd179263f334bcfaca76d320d57d7bd19 (patch) | |
tree | b00e8ece51db0b93ba9c2c1fb081ac58bc4f3a3b | |
parent | 846c72a3b8f2319170fd313abb8be8eb16e0e3d7 (diff) | |
download | php-git-a467a42dd179263f334bcfaca76d320d57d7bd19.tar.gz |
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.
-rw-r--r-- | ext/tidy/tests/016.phpt | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/ext/tidy/tests/016.phpt b/ext/tidy/tests/016.phpt index 001371aa3e..05b7cc18f9 100644 --- a/ext/tidy/tests/016.phpt +++ b/ext/tidy/tests/016.phpt @@ -4,21 +4,10 @@ Passing configuration file through tidy_parse_file() (may fail with buggy libtid <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $tidy = tidy_parse_file(dirname(__FILE__)."/016.html", dirname(__FILE__)."/016.tcfg"); - tidy_clean_repair($tidy); - echo tidy_get_output($tidy); + $tidy = tidy_parse_file(dirname(__FILE__)."/016.html", + dirname(__FILE__)."/016.tcfg"); + $cfg = $tidy->getConfig(); + echo $cfg["clean"]; ?> --EXPECT-- -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<html> -<head> -<title></title> - -<style type="text/css"> - p.c1 {font-weight: bold} -</style> -</head> -<body> -<p class="c1">testing</p> -</body> -</html> +1 |