Skip to content

Commit d66c19c

Browse files
committed
Test read-write/read-only
1 parent 9ac5f6f commit d66c19c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
--TEST--
2+
CSS Selectors - Pseudo classes: read-write/read-only
3+
--EXTENSIONS--
4+
dom
5+
--FILE--
6+
<?php
7+
8+
require __DIR__ . '/test_utils.inc';
9+
10+
$dom = DOM\XMLDocument::createFromString(<<<XML
11+
<html xmlns="http://www.w3.org/1999/xhtml">
12+
<input type="text" readonly="" />
13+
<textarea readonly="" />
14+
<input type="text" disabled="" />
15+
<textarea disabled="" />
16+
<input type="text" xmlns="" />
17+
<textarea xmlns="" />
18+
<input type="text" />
19+
<textarea />
20+
</html>
21+
XML);
22+
23+
test_helper($dom, ':read-write');
24+
test_helper($dom, ':read-only');
25+
26+
?>
27+
--EXPECT--
28+
--- Selector: :read-write ---
29+
<input xmlns="http://www.w3.org/1999/xhtml" type="text" />
30+
<textarea xmlns="http://www.w3.org/1999/xhtml"></textarea>
31+
--- Selector: :read-only ---
32+
<html xmlns="http://www.w3.org/1999/xhtml">
33+
<input type="text" readonly="" />
34+
<textarea readonly=""></textarea>
35+
<input type="text" disabled="" />
36+
<textarea disabled=""></textarea>
37+
<input xmlns="" type="text"/>
38+
<textarea xmlns=""/>
39+
<input type="text" />
40+
<textarea></textarea>
41+
</html>
42+
<input xmlns="http://www.w3.org/1999/xhtml" type="text" readonly="" />
43+
<textarea xmlns="http://www.w3.org/1999/xhtml" readonly=""></textarea>
44+
<input xmlns="http://www.w3.org/1999/xhtml" type="text" disabled="" />
45+
<textarea xmlns="http://www.w3.org/1999/xhtml" disabled=""></textarea>
46+
<input xmlns="" type="text"/>
47+
<textarea xmlns=""/>

0 commit comments

Comments
 (0)