From 6319a358496dda48d2c9541aec59fa78a0a96492 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 9 Jun 2016 23:39:07 -0400 Subject: [PATCH] ext/tidy: work around a legacy libtidy bug in a test. Our existing test 024.phpt actually tests incorrect behavior. There is a self-closing tag present in the input, but the expected output has that same tag half-open (i.e. open but never closed). To support tidy-html5, which does the right thing, that test needed to be changed. The self-closing tag was replaced by an explicit pair of tags, and some extra whitespace fudging was done. --- ext/tidy/tests/024.phpt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ext/tidy/tests/024.phpt b/ext/tidy/tests/024.phpt index b09f5b4643..6a258b30aa 100644 --- a/ext/tidy/tests/024.phpt +++ b/ext/tidy/tests/024.phpt @@ -13,28 +13,27 @@ if (strtotime(tidy_get_release()) < strtotime('20 january 2007')) die ('skip old $contents = ' - + '; $config = array( +'doctype' => 'omit', 'new-blocklevel-tags' => 'wps:block,wps:var,wps:value', 'newline' => 'LF' ); $tidy = tidy_parse_string($contents, $config, 'utf8'); $tidy->cleanRepair(); - -var_dump($tidy->value); +echo $tidy; ?> --EXPECTF-- -string(11%d) " + -%w -%w +%w%w%w%w -" + -- 2.50.1