From: Michael Orlitzky Date: Fri, 10 Jun 2016 03:39:07 +0000 (-0400) Subject: ext/tidy: work around a legacy libtidy bug in a test. X-Git-Tag: php-7.1.0beta1~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6319a358496dda48d2c9541aec59fa78a0a96492;p=php 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. --- 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 -" +