xref: /PHP-5.4/ext/tidy/tests/024.phpt (revision 4426bfee)
1--TEST--
2libtidy handling of 'new-blocklevel-tags'
3--SKIPIF--
4<?php
5if (!extension_loaded('tidy')) die('skip');
6if (strtotime(tidy_get_release()) < strtotime('20 january 2007')) die ('skip old libtidy');
7?>
8--FILE--
9<?php
10
11// more info at http://sf.net/tracker/?func=detail&atid=390963&aid=1598422&group_id=27659
12
13$contents = '
14<wps:block>
15<wps:var>
16<wps:value/>
17</wps:var>
18</wps:block>';
19
20$config = array(
21'new-blocklevel-tags' => 'wps:block,wps:var,wps:value',
22'newline' => 'LF'
23);
24
25$tidy = tidy_parse_string($contents, $config, 'utf8');
26$tidy->cleanRepair();
27
28var_dump($tidy->value);
29
30?>
31--EXPECTF--
32string(11%d) "<html>
33<head>
34<title></title>
35</head>
36<body>
37<wps:block>%w<wps:var>
38<wps:value></wps:var>%w</wps:block>
39</body>
40</html>"
41