com php-src: ext/tidy: update the configuration file test to not inspect output.: ext/tidy/tests/016.phpt
| From: | Anatol Belski | Date: | Mon, 11 Jul 2016 12:05:43 +0000 |
| Subject: | com php-src: ext/tidy: update the configuration file test to not inspect output.: ext/tidy/tests/016.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-92923@lists.php.net to get a copy of this message | ||
Commit: a467a42dd179263f334bcfaca76d320d57d7bd19
Author: Michael Orlitzky <michael@orlitzky.com> Thu, 9 Jun 2016 23:29:14 -0400
Committer: Anatol Belski <ab@php.net> Mon, 11 Jul 2016 14:05:43 +0200
Parents: 846c72a3b8f2319170fd313abb8be8eb16e0e3d7
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a467a42dd179263f334bcfaca76d320d57d7bd19
Log:
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.
Changed paths:
M ext/tidy/tests/016.phpt
Diff:
diff --git a/ext/tidy/tests/016.phpt b/ext/tidy/tests/016.phpt
index 001371a..05b7cc1 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