xref: /PHP-8.2/ext/tidy/tests/gh12980.phpt (revision b3f483db)
1--TEST--
2GH-12980 (tidynode.props.attribute is missing "Boolean Attributes" and empty attributes)
3--EXTENSIONS--
4tidy
5--FILE--
6<?php
7$html = '<!DOCTYPE html><html lang="en" boolean empty="" selected="selected"></html>';
8
9$tidy = new tidy();
10$tidy->ParseString($html);
11echo tidy_get_output($tidy), "\n";
12
13var_dump($tidy->root()->child[1]->attribute);
14
15?>
16--EXPECT--
17<!DOCTYPE html>
18<html lang="en" boolean="" empty="" selected="selected">
19<head>
20<title></title>
21</head>
22<body>
23</body>
24</html>
25array(4) {
26  ["lang"]=>
27  string(2) "en"
28  ["boolean"]=>
29  string(0) ""
30  ["empty"]=>
31  string(0) ""
32  ["selected"]=>
33  string(8) "selected"
34}
35